Friday, January 10, 2014

Taking Java heap Dump from Command Line

Use jps command  to find out the process id
jdk160_35/bin>./jps
22321 jvmapp
58468 Jps

Use jmap to acquire the dump
jdk160_35/bin> ./jmap -dump:format=b,file=\tmp\my.hprof 22321
Dumping heap to\tmp\my.hprof ...
Heap dump file created

No comments:

Post a Comment