Monday 9 April 2012

Java Heap analysis using jdk tools

To take a heap dump of a java process using the jdk tools, use jmap:
jmap -dump:format=b,file=heap.bin <pid>
where pid is the process id of the java process.


After taking the heap dump, you can use the jhat (Java Heap Analyzer tool) provided by jdk to analyse te heap dump:
jhat -port 7777

No comments:

Post a Comment