WebSphere Application Server - Express, Version 6.0.x     Operating Systems: AIX, HP-UX, Linux, Solaris, Windows

Generating heap dumps manually

Use this task to manually generate heap dumps.

Before you begin

Although heap dumps are only generated in response to a detected memory leak, you must understand that generating heap dump can have a severe performance impact on the 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 analysis of memory leaks. On 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 Serve, 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 run-time operations. The WebSphere Application Server only supports the Jacl and Jython scripting languages. To learn more about the wsadmin tool, see the Starting the wsadmin scripting client topic.

Steps for this task

  1. Start the wsadmin scripting client. There are several options for you to run scripting commands, ranging from running them interactively to running them in a profile.
  2. Invoke the generateHeapDump operation on JVM MBean, for example,
    • Finding JVM objectName:
      <wsadmin> set objectName [$AdminControl queryNames 
      WebSphere:type=JVM,process=<serverName>,node=<nodeName>,*]  
    • Invoking the generateHeapDump operation on JVM MBean:
      <wsadmin> $AdminControl invoke $objectName generateHeapDump
      where,
      $ 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 HeapDump
      <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 theLocating and analyzing heap dumps topic. When you have 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 information
[Version 6.0.2]Enabling automated heap dump generation
[Version 6.0.2]Locating and analyzing heap dumps

Task topic    

Terms of Use | Feedback

Last updated: Jun 8, 2005 12:45:23 PM EDT
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/tprf_generatingheapdumps.html

© Copyright IBM Corporation 2002, 2005. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)