WAS v8.5 > Tune performance > Obtain advice from the advisors > Use the Performance and Diagnostic Advisor > Enable automated heap dump generation

Generate heap dumps manually

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

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 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. You might want to manually generate heap dumps for the analysis of memory leaks. You might also want to designate certain times to take heap dumps because of the overhead involved. On JVM in WAS, we can manually produce heap dumps using the generateHeapDump operation on WAS managed beans (MBeans) that are special Java beans.

On a JVMs in WAS, we cannot enable automated heap dump generation.

The WAS wsadmin tool provides the ability to run scripts. We can 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. To learn more about wsadmin, see the starting the wsadmin scripting client information.

  1. Determine to use wsadmin or the dmgr console to generate your heap dump.
  2. To use wsadmin to generate your heap dump, complete the following:

    1. Start the wsadmin scripting client. You have several options to run scripting commands, ranging from running them interactively to running them in a profile.
    2. Invoke the generateHeapDump operation on a JVM MBean, for example:

      • Find a JVM objectName:
        <wsadmin> set objectName [$AdminControl queryNames 
        WebSphere:type=JVM,process=<servername>,node=<nodename>,*]  
      • Invoke the generateHeapDump operation on JVM MBean:

          <wsadmin> $AdminControl invoke $objectName generateHeapDump

        Description of variables. The following table explains variables in the command previously mentioned.

        Variable Description
        $ 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 to generate a heap dump
        <nodename> is the node to which <servername> belongs

  3. To use the dmgr console to generate your heap dump, complete the following:

    1. Start the dmgr console.
    2. In the navigation pane, click Troubleshooting > Java dumps and cores.

    3. Select the server_name for which to generate the heap dump.

    4. Click Heap dump to generate the heap dump for the specified server.

After running wsadmin, 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 we 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. See the diagnosing out-of-memory errors and Java heap memory leaks information.


Related


Enable automated heap dump generation
Locating and analyzing heap dumps
Start the wsadmin scripting client using wsadmin.sh


+

Search Tips   |   Advanced Search