Jmap

From NovaOrdis Knowledge Base
Revision as of 23:56, 5 February 2018 by Ovidiu (talk | contribs)
Jump to navigation Jump to search

External

Internal

Overview

jmap -dump:file=dump.bin <pid>

where <pid> can be obtained with jps.

Capturing Permanent Generation Info

jmap -permstat JBOSS_PID >& permstat.out

When JVM is too Busy to Allow Sockets

Use -F:

jbossusr@tcffep4r6ap26 log]$ /opt/jboss/java/jdk1.6.0_29/bin/jmap -dump:file=/opt/tmp/ap26.dump 1670 
1670: Unable to open socket file: target process not responding or HotSpot VM not loaded
The -F option can be used when the target process is not responding


jmap -F -dump:file=/opt/tmp/ap26.dump 1670 
Attaching to process ID 1670, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 20.4-b02
Dumping heap to /opt/tmp/ap26.dump ...