Use this task to manually generate heap dumps on AIX, Linux, and Windows operating systems.
Before you begin
Although heap dumps are generated only in response to a detected memory leak, you must understand that generating heap dumps can have a severe performance impact on WebSphere Application Server 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.Why and when to perform this task
You might want to manually generate heap dumps for the analysis of memory leaks. On a Java virtual machines (JVM) in WebSphere Application Server, you cannot enable automated heap dump generation. You might want to designate certain times to take heap dumps because of the overhead involved. On JVM in WebSphere Application Server, you can manually produce heap dumps by using the generateHeapDump operation on WebSphere Application Server managed beans (MBeans) that are special Java beans.The WebSphere Application Server wsadmin tool provides the ability to run scripts. You can use the wsadmin tool to manage a WebSphere Application Server installation, as well as configuration, application deployment, and server runtime operations. WebSphere Application Server supports the Jacl and Jython scripting languages only. To learn more about the wsadmin tool, see the Starting the wsadmin scripting client topic.
Steps for this task
<wsadmin> set objectName [$AdminControl querynames WebSphere:type=JVM,process=<servername>,node=<nodename>,*]
<wsadmin> $AdminControl invoke $objectname generateHeapDump
$ | is a Jacl operator for substituting a variable name with its value |
invoke | is the command |
generateHeapDump | is the operation you are invoking |
<servername> | is the name of the server on which you want to generate a heap dump |
<nodename> | is the node to which <servername> belongs |
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. For example, you can download a technology preview from WebSphere Serviceability.Related informationAutomated heap dump generation support
Locating and analyzing heap dumps