Producing a JRockIt heap dump at will

This is not easy to find using google. Most searches will redirect you to irrelevant tips, or stuff about the OOM behavior. If one day this blog becomes popular, it will be easier for people to find this.

Go to your jrockit bin directory and su as the java process you want to target. Then, type :

./jrcmd [PID] hprofdump filename=[filename]

Done !

Advertisements

6 thoughts on “Producing a JRockIt heap dump at will

  1. excellent , this is what i am looking for. BTW does this .hprof will work with the MAT(Eclipse MAT Tool) tool?

  2. Hi,
    nice thing but i got the following error:
    Unable to open socket file: target process not responding or HotSpot VM not loaded
    The wls is running, the pid is ok and the java process is:
    java version “1.6.0_11”
    Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
    BEA JRockit(R) (build R27.6.3-40_o-112056-1.6.0_11-20090318-2103-linux-x86_64, compiled mode)
    What can be wrong?

  3. Hi,

    if the hprof file is too large, we need a portable one phd file, can you please give us what command is needed for this

    Regards,
    Ram

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s