Tags » Jmap

Java process heap dump & its analysis - How to?

First take the heap dump either with,

  1. jmap

JAVA_HOME/bin/jmap -dump:format=b,file=dump.bin
JAVA_HOME/bin/jmap -dump:format=b,file=dump.bin 19225

2. Obtain the heap dump using a java startup parameter


3. Parse & Analyse the dump with Eclipse (I have used Memory Analyzer (MAT)), Following diagram should be self explanatory,


Heap dump in Java

jmap -J-d64 -dump:live,format=b,file= 

One can then import the dump to jprofiler or jvisualvm


Memory Analysis - How to obtain Java Heap Dump?

In this article we will see how to obtain the Java Heap Dump to troubleshoot the memory issues like memory leak and high usage of memory. 332 more words


Steps for taking Thread and Heap Dumps

  1. find the PID using
    • jps -v   OR
    • ps -ef | grep -i java
  2. Thread Dump:
    • JRockit:  jrcmd <PID> print_threads >> path (example: /home/hasanr/threadDump.log)
    • JDK 1.7 or higher: jcmd <PID> Thread.print >> sample.txt…
  3. 199 more words
JDK Tools