Generate heap dumps manually

 

+

Search Tips   |   Advanced Search

 

Overview

Use this task to generate heap dumps manually. This function is not supported on when using a Sun JVM which includes WAS running on HP-UX and Solaris operating systems.

[Windows] [AIX] [Linux] Although heap dumps are generated only in response to a detected memory leak, understand that generating heap dumps can have a severe performance impact on WAS for several minutes. When generating multiple heap dumps manually for memory leak analysis, make sure that significant objects are leaked in between the two heap dumps. This approach enables problem determination tools to identify the source of the memory leak.

You might want to manually generate heap dumps for the analysis of memory leaks. You might want to designate certain times to take heap dumps because of the overhead involved. On JVM in WAS, you can manually produce heap dumps by using the generateHeapDump operation on WAS managed beans (MBeans) that are special Java beans.

The wsadmin tool provides the ability to run scripts. You can use the wsadmin tool to manage a WAS installation, as well as configuration, application deployment, and server runtime operations. WAS supports the Jacl and Jython scripting languages only.

To invoke the generateHeapDump operation on a JVM MBean, for example...

 set objectName [$AdminControl queryNames WebSphere:type=JVM,process=<server>,node=<node>,*]  

$AdminControl invoke $objectName generateHeapDump

 

What to do next

After running the wsadmin command, the file name of the heap dump is returned. For more information on finding heap dumps, refer to the Locating and analyzing heap dumps topic.

When you have a couple of heap dumps, use a number of memory leak problem determination tools to analyze your problem.

Memory Dump Diagnostic for Java is an offline tool for diagnosing root causes behind memory leaks in the Java heap.



Enable automated heap dump generation

 

Related information

Locate and analyze heap dumps
Diagnose out-of-memory errors and Java heap memory leaks