Jmap: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * Java Heap Dump")
 
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
=External=
* http://download.oracle.com/javase/6/docs/technotes/tools/share/jmap.html
* http://blogs.sun.com/alanb/entry/heap_dumps_are_back_with
* http://jfarcand.wordpress.com/?s=jmap
=Internal=
=Internal=


* [[Java Heap Dump#Overview|Java Heap Dump]]
* [[Java Heap Dump#Overview|Java Heap Dump]]
=Overview=
jmap -dump:file=dump.bin <pid>
where <pid> can be obtained with <tt>jps</tt>.
=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 ...

Latest revision as of 23:57, 5 February 2018

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 ...