05
1/ JVM instrumentation(add JVM option)
-Xdump:java+heap+system+snap:events=user,request=exclusive+prepwalk
2/ Find java process (PID)
ps aux | grep java
or
ps auxwww | grep java
or
jps -v | grep -iv jps
3/ Trigger heap dump in hprof format
jmap -dump:format=b,file=dump.hprof <PID>
4/ Analyze dump with MAT
(cf. download Eclipse Memory Analyzer http://www.eclipse.org/mat/downloads.php)
File->Open Heap Dump …
5/ Analyze dump with jhat
>launch jhat on heap dump:
jhat dump.hprof
>go to http://localhost:7000/