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.
All these metrics can be obtained using JMX. You can write a monitoring Java program that connects to external (target) JVMs' MBeanServer
and 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).