Generate heap dumps manually
Overview
Use this task to generate heap dumps manually for the analysis of memory leaks.
This function is not supported on when using a Sun JVM which includes WebSphere Application Server running on HP-UX and Solaris operating systems.
Generate heap dumps can have a severe performance impact on WAS for several minutes.
When generating multiple heap dumps manually for memory leak analysis, verify significant objects are leaked in between the two heap dumps. This approach enables problem determination tools to identify the source of the memory leak.
We can manually produce heap dumps using the generateHeapDump operation on WAS managed beans (MBeans) that are special Java beans.
The wsadmin tool provides the ability to run scripts. Use wsadmin to manage a WAS installation, as well as configuration, application deployment, and server runtime operations. WAS supports the Jacl and Jython scripting languages only.
Generate heap dumps
- To use wsadmin to generate the heap dump...
> wsadmin -jython
<wsadmin> set objectName [$AdminControl queryNames WebSphere:type=JVM,process=<servername>,node=<nodename>,*]
<wsadmin> $AdminControl invoke $objectName generateHeapDump
- To generate a heap dump using dmgr console...
Troubleshooting | Java dumps and cores | server | Heap dump
After running wsadmin, the file name of the heap dump is returned.
When we have a couple of heap dumps, use a number of memory leak problem determination tools to analyze the problem. Memory Dump Diagnostic for Java is an offline tool for diagnosing root causes behind memory leaks in the Java heap. See the diagnosing out-of-memory errors and Java heap memory leaks information.
Related
Enable automated heap dump generation
Locating and analyzing heap dumps
wsadmin scripting client using wsadmin.sh