How to monitor memory usage and allocation for Java?
4 answers
You can turn on JMX monitoring at the application server level. Here are the java JVM options I use to turn it on (no password...)
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.port=1099
I use this with both WebSphere application server as well as Tomcat successfully in all versions of CLM. I have integrated this with logicmonitor.com's SaaS monitoring very successfully to show online dashboards of what is going on in the server. Here is a demo that we use at oncloudone.net:
https://oncloudone.logicmonitor.com/santaba/uiv2/onegadgets/index.jsp?c=oncloudone&u=demo&p=demo
Username: demo
Password: demo
All too often people forget to tune their Java settings and end up throwing a lot more hardware (CPU power) when all that is needed is a few JVM tweaks to prevent the garbage collection from running too often.
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.port=1099
I use this with both WebSphere application server as well as Tomcat successfully in all versions of CLM. I have integrated this with logicmonitor.com's SaaS monitoring very successfully to show online dashboards of what is going on in the server. Here is a demo that we use at oncloudone.net:
https://oncloudone.logicmonitor.com/santaba/uiv2/onegadgets/index.jsp?c=oncloudone&u=demo&p=demo
Username: demo
Password: demo
All too often people forget to tune their Java settings and end up throwing a lot more hardware (CPU power) when all that is needed is a few JVM tweaks to prevent the garbage collection from running too often.
Did you try took look at the working set used by your java process (task mgr. or top/vmstat on linux)
Comments
For high level heap usage, you can simply look into the Jazz application admin page, eg: <host>/jts/admin: it will show the VM memory usage.
Another useful JVM option is to enable verbose GC (adding option -verbose:gc on JVM command line), it will log GC activity, and there are tools helping visualize it and notice memory levels, GC pauses etc...
JMX (suggested above) is another good option.
Another useful JVM option is to enable verbose GC (adding option -verbose:gc on JVM command line), it will log GC activity, and there are tools helping visualize it and notice memory levels, GC pauses etc...
JMX (suggested above) is another good option.
Comments
Daniel Pool
JAZZ DEVELOPER Oct 08 '12, 1:09 p.m.Sandra Bernspang
JAZZ DEVELOPER Oct 09 '12, 4:20 a.m.Sandra Bernspang
JAZZ DEVELOPER Oct 09 '12, 4:46 a.m.