background img
banner
Sep 10, 2013
247 Views
0 0

JMAP for Java Heap Dump

Written by
banner

 

logo

 

 

 

 

There may be some scenarios where you need to take java heap dumps without connecting to a profiler, or there may be chances that you want to see only live heap objects or you may be asked to find out the live java heap objects which causes application slow down/out of memory at run time. For all of these , there is a solution lies with in JAVA JDK – JMAP .

Details:

JMAP – Prints Heap memory details of the debug server

Steps:

Open Terminal in the debug server

Find out the process id of the java application for which the heap dump should be taken
ps -aef | grep java

Go to bin directory of your java and give the following command
jmap -dump:live,format=b,file=<filenmae.bin> <pid>

Live option displays only live objects present at the moment.

Article Categories:
Performance Testing
banner

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.