I am wondering if it is possible to store the results shown by visualVM (memory usage, GC activity, Heap…) in a database so that we could consult them later?
If anyone has an idea, or a better alternative to visualVm I would be thankful.
Many thanx.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
All these metrics can be obtained using JMX. You can write a monitoring Java program that connects to external (target) JVMs’
MBeanServerand dumps selected JMX metrics into the database.You can also use fabulous Jolokia library to fetch these metrics using virtually any language that support HTTP. Also Jolokia itself can store historical values of selected metrics.
That being said, can’t you simply dump interesting values to application logs (or maybe to some selected file) and process them offline? Log files are both easier to maintain (logging framework can delete old ones for you) and to access (storing in database vs. logging to file).