Sunday, May 9, 2010

Generating An IBM Heap Dump On Windows

I recently was trying to force a Java heap dump on windows running in IBM WebSphere Application Server. I clicked around, found a few sites, pieced it together and got it working. Here is what I did.
  • In the windows task manager, add the PID into the view so you know what to kill
    • Finding the server process is as easy as the java process consuming the most memory and CPU
  • Add the following VM argument
    • -XX:+HeapDumpOnCtrlBreak
  • Add environment variables
    • IBM_HEAP_DUMP=true
    • IBM_HEAPDUMP=true
    • IBM_HEAPDUMPDIR=C:\WCToolkitEE60\wasprofile\logs\server1
      • This can be whatever you want really, this is where I see heap dumps put in general. 
      • I found that the heap analyzer reads the binary files quicker
  • Download
  • A link
  • Then I just started the server and used the SendSignal
  • All worked to get the dump
 Since its an IBM heap, you need the IBM heap analyzer to read the dump.

No comments:

Share on Twitter