Analyze and respond to a WebSphere heap dump

Home > Search

Make sure the JVM is OK

If a heap dump is unexpectedly or automatically created, ensure that the JVM associated with the heap dump is still running properly. The heap dump files can be used to determine the PID associated with the heap dump, and then the PID can be used to determine the JVM associated with the heap dump. The heap dump files are in this format:



For example, let's say the PID is 12345. If the output of the ps command only displays the grep command, the PID is no longer in use, which means that the JVM that was associated with the PID was probably automatically restarted as part of the heap dump. However, if there is a significant amount of output, the JVM may be in a bad way. If the JVM is in a bad way, the JVM may need to be restarted.

~]# ps -ef | grep 12345


You can search the logs with the PID to determine what JVM was associated with the PID. This command will usually produce quite a bit of output, as this command searches every file and and below the specified directory for the string (12345 in this example). This may help you find the JVM that had the PID associated with the heap dump.

~]# grep -Rnw /path/to/logs/directory -ie '12345'


Once you know the JVM that had the PID with the heap dump, determine if the JVM was restarted. You can check the SystemOut.log file for the event "open for e-business" to determine when the JVM was last restarted.

~]# cat SystemOut.log | grep e-business
[2/1/18 4:27:32:991 CST] 0000001 WsServerImpl A WSVR0002I: Server server1 open for e-business; process id is 12345.


Transfer the heap dump

Transfer the heap dump from the WebSphere server to another PC, such as your personal laptop. You never want to analyze a heap dump on the WebSphere application server, as this will use significant resources, such as memory and CPU, which will impact the performance of the WebSphere application server. The heapdump should be located in the hidden profile directory of the application server, such as /opt/IBM/WebSphere/AppServer/profiles/profile01/./, and the heap dump should have the following name syntax.



Analyze the heap dump

IBMs Heap Analyzer can be used to analyze a heap dump. IBMs Heap Analyzer can be installed as a tool in IBMs Support Assistant Team Server


In IBMs Heap Analzyer, select File > Open, select the file, and select Open. The analysis will identify the Java classes that contain objects that are taking up heap space. In this example, the java/lang/Object class is using 27.59% of the heap.


A class is a container that contains one or more objects. In this example, there is a class called Dog that contains an object called Puppy with a value of Old Yeller. The programmer that created the application that has classes taking up heap space will need to determine if a code change can be made to the application to reduce the heap space being used by the class.

Public class Dog {
  Public static void main(String []args){
    Puppy myPuppy = new Puppy( "Old Yeller" );



Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter in the box below so that we can be sure you are a human.