THREAD DUMP & HEAP DUMP “Free Tools to Analyze”


On Weblogic ‘Jrocket or plain jvm’ steps to ANALYZE thread dump and heap dump.

Steps to collect Thread dump:

Using Admin Console

a. Log into the Admin Console , click on the server

b. Click onto the Server  –> Monitoring  –> Threads

c. Click on the Dump Thread Stack

Or

On UNIX/ Linux

Find the process id for your server

  1. Ps –ef  | grep java
  2. Kill -3 <pid>

WebLogic utilities to capture thread dumps

1. webLogic.Admin utility

a. Open a command prompt , set the classpath running<DOMAIN_HOME>/bin/setDomain.env

b. Execute the below command

java weblogic.Admin -url t3://localhost:7001 -username weblogic -password weblogic1 THREAD_DUMP

Note: Thread Dump will be printed to the servers standard out (by default, the shell in which the server is running).

Steps to collect heap dump:

Steps to collect JVM heap dump on Weblogic (Jrocket & Java)
nnn-gcgcgc-lbpp27::/ngs/…logs$ cd  /apps/psadmp/CRMBASE/Engine/jrockit/jrockit-jdk1.6.0_29-R28.2.2-4.1.0-linux-x64/bin/
nnn-gcgcgc-lbpp27::/ngs/…bin$ ps -ef | grep java
psadmp    3829  3540  2 00:53 ?        00:15:39 /apps/psadmp/CRMBASE/Engine/jrockit/jrockit-jdk1.6.0_29-R28.2.2-4.1.0-linux-x64/bin/java
fsnusrp   7469  7108  0 13:55 pts/2    00:00:00 grep java
psadmp   15488 15456  0  2013 ?        07:55:40 /apps/psadmp/CRMBASE/Engine/jrockit/jrockit-jdk1.6.0_29-R28.2.2-4.1.0-linux-x64/bin/java

If it is to collect the heap dumps, this is how you do that:
a) Login as psadmp user to the host on which these JVMs run
b) Get the process ID of the JVM for which you need to collect the heap dump

c) At this location: /apps/psadmp/CRMBASE/Engine/jrockit/jrockit-jdk1.6.0_29-R28.2.2-4.1.0-linux-x64/bin/ execute the below command:
jrcmd <process-id> hprofdump filename=<file_name>.hprof

d) The heap dump will be collected and placed at the home directory of the weblogic domain (In this case it is @ /apps/psadmp/CRMBASE/Engine/mw12chome/user_projects/domains/cctechp04_domain)
jrcmd 3829 hprofdump filename=hd_elobws-p02_5_5_6_57_am_PST.hprof
jrcmd 3540 hprofdump filename=hd_elobws-p02_5_5_6_57_am_PST_1.hprof

TOOLS TO ANALYZE:
For Heap Dump

The stand-alone Memory Analyzer is based on Eclipse RCP. It is useful if you do not want to install a full-fledged IDE on the system you are running theheap analysis.

To install the Memory Analyzer into an Eclipse IDE use the Update Manager and the update site URL provided below. The Memory Analyzer (Chart) feature is optional. The chart feature requires the BIRT Chart Engine (Version 2.3.0 or greater, available via Update Manager).

The minimum Java version required to run Memory Analyzer is 1.5

Memory Analyzer 1.3.0 Release