Notifications
Clear all

[Solved] How can I force a heap dump on a running instance?

2 Posts
3 Users
3 Reactions
881 Views
1
Topic starter

How can I force a heap dump on a running instance?

1 Answer
2

You can use the jmap utility comes with jdk.
Syntax is :
jmap [option] <javaprocessid>
(to connect to running process)
example : /usr/java/latest/bin/jmap -dump:format=b,file=/one/PLT/heap.bin 23467

This will create a heap dump file under /one/PLT/heap.bin for Jboss running as PID 23467.

Make sure the user has a writable permission at location where the heap dump being generated. If there are issues with permission sometimes I see error like "HotSpot JVM not found." which is bogus.

MythriPericharla 2013-05-28 16:05:00