Java – how to get a heap dump from running Tomcat 7
•
Java
I tried this get a heapdump on JVM from Tomcat 6
Solution
The easiest way to get a heap dump is to use jmap Execute the jmap command on a machine with a java process Use example:
jmap -dump:file=/mnt/heapdump_2013-04-01.data29842
Use JPS to know Java PID
In addition, you can perform heap dumps through jvisual VM You can connect to a remote computer through JMX or jstatd You can store heapdump on a remote computer
To analyze heapdumps, I suggest you: mat Very powerful tools, let you quickly understand the problem You can find here good inro in mat
If you don't want to stop the application for a long time, you can use gcore or GDB You can use jmap to analyze GDB dump For more information, you can read it on the atlas Ian blog Be careful of some issues
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码