How to take a heapdump and javacore of running Portal Server instance?

Taking a heap dump can help you to diagnose the hung threads on a Portal system. A heap dump is nothing but a dump of memory of the Java heap. Similarly a java core will provides you some insights into the multiple processing running inside of the heap at a given point of time.

Note: Java cores should be taken two minutes apart in order determine if processes are hanging across intervals.

Depending on the version of Portal or WAS installed, the heap dumps and java cores are placed in different locations on the filesystem.


For Portal 5.1, the files are located in folder /WebSphere/AppServer /
For Portal 6.x, the files are located in  folder /IBM/WebSphere/AppServer/profiles/wp_profile/

The naming convention of these files is something like heapdump.20130318.151306.1168.phd and
javacore.20130305.085618.4412.txt

Below are the steps for creating a heap dump using simple command:

1. Find out the PID of the Portal server by typing the command 'ps -ef|grep java'.
2. Type 'kill -3 ' on the prompt and wait for some time.
3. Verify that the heap dump and javacore are created in the targeted directory.
4. Wait for couple of minutes, and then again run 'kill -3 ' command.


or

Another simple way of creating a heap dump in windows environment is to :


Heapdump
Heapdump
  • Right click on task manager. 
  • Look for the running JVM process.
  • Right click again and click End process to kill the selected process.

No comments:

Post a Comment