Quantcast
Channel: eInfoBuzz » Garbage Collector
Viewing all articles
Browse latest Browse all 3

Java Heap Dump

$
0
0

After JDK6 its easy to generate Java Heap dumps using jmap.
here is a quick example, make sure your user has the permission to write on the dump folder.

./jmap -dump:live,format=b,file=/var/tmp/abc.hprof pid
where pid is the process id, live option ensures to dump only live objects (yes JVM executes FULL GC before dumping heap)

you can search your java process pid using
ps -ef | grep java

once done you might need to give permission right to download the file, I just simply change the mode to all permission.
chmod 777 /var/tmp/abc.hprof

Once downloaded, I use visualvm or jvisualvm to analyze the heap dumps.


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images