Tuesday, October 18, 2011

Generating Heap dumps and Thread dumps


Automated heap dump generation


  1. Click Servers > Application servers in the administrative console navigation tree.
  2. Click server_name >Performance and Diagnostic Advisor Configuration.
  3. Click the Runtime tab.
  4. Select the Enable automatic heap dump collection check box.
  5. Click OK.

Generating Heap dump Manually

set jvm [$AdminControl completeObjectName type=JVM,process=server1,*]

Where server1 is the name of application server for which we want heapdump.

For generating heap dump:

$AdminControl invoke $jvm generateHeapDump

Generating Thread dump Manually

set jvm [$AdminControl completeObjectName type=JVM,process=server1,*]

Where server1 is the name of application server for which we want heapdump.

For generating Thread dump:

$AdminControl invoke $jvm dumpThreads

OR
use kill -3 PID on unix/linux machines.

Automatically



There are some conditions where a thread dump is created automatically for your Java Virtual Machine (JVM), such as when WebSphere Application Server is stopped by some means other than a normal stop server request


 Thread dumps can also be triggered by issuing a signal to the WebSphere Application Server process. For example, to produce a thread dump in a UNIX environment, you can run this command:

kill -3 process_id

No comments:

Post a Comment