HeapWizard Java Heap Analyzer for diagnosing memory leaks

Downloadable files
Abstract
HeapWizard reads and analyzes a heapdump.txt file produced by Java™ SDKs (1.1.8 and up).
Download Description
HeapWizard is a "post-processor" tool for analyzing heap dumps created by the IBM_HEAPDUMP JVM option. IBM_HEAPDUMP is a lightweight, low-performance-impact alternative to hprof-type dumps. IBM_HEAPDUMP is supported on Java SDKs delivered by IBM® for Microsoft® Winodws®, AIX® and Linux® platforms, version 1.1.8 and up.

To create a heap dump for analysis by HeapWizard, set the environment variable IBM_HEAPDUMP with a value of "true" where the target application server runs. This may be done at the operating system level, or in the WebSphere® Application Server administrative console panes which allow you to add variable names and values to an Application Server's environment. To set the environment variable for the AdminServer, modify the startupServer.sh (UNIX®) or startupServer.bat (Windows).

After starting an Application Server, the IBM dump is triggered in the same way a java thread is triggered.

  • On Windows and Unix environments for WebSphere Application Server V3.0.2.4 through V4.0.x, this can be accomplished by examining the application server's log file for a statement like:

    DrAdmin available on port nnnn

    and then executing the statement

    DrAdmin -serverPort nnnn -dumpThreads

  • On WebSphere Application Server V5.0.x and later, the thread and heap dumps can be generated by executing the following commands:

    • From the install_Root/bin directory, enter the command wsadmin to enter command mode

    • Get a handle to the problem application server:

      wsadmin>set jvm [$AdminControl completeObjectName type=JVM,process=server1,*]

      where "server1" is the name of the target server (the rest of the command is entered literally)

    • generate the thread dump:

      wsadmin>$AdminControl invoke $jvm dumpThreads.

On Unix platforms the dump can be created by executing "kill -3 <pid>" against the target JVM™.

The dump file will be created in the bin directory under the name heapdump.yyyymmdd.mmmmmm.nnnn.txt.

Using HeapWizard

HeapWizard reads and analyzes a heapdump.txt file produced by Java SDKs delivered by IBM (1.1.8 and up, Unix and Windows platforms). It can be run from the command line (to provide an XML format file) or work as a GUI to provide an expandable tree view.

To start HeapWizard in GUI mode, use the following:

java -Xms128M -Xmx512M -jar HeapWizard.jar

For details on using HeapWizard to diagnose and repair memory leaks in the WebSphere Application server and other JVM processes, see the readme.txt file supplied with the tool.

Change History

  • 23 May 2003: Original publication.
  • 15 Oct 2004: Enhanced to support Java SDK 1.4.2
  • 3 Nov 2004: Version 2.3.15 enhances support for Java SDK 1.4.2
Prerequisites
Java J2SE 1.3.1 Xerces v1.4, if you need to output the result in XML.
Installation instructions
HeapWizard is an executable jar file. Download it to a directory of your choice. Extract and read the readme.txt file from the jar file.

To start HeapWizard in GUI mode, use the following command (you may need to increase the Xmx value depending on the heapdump):
java -Xms128M -Xmx512M -jar HeapWizard.jar

For more details on HeapWizard and its runtime option, see the readme.txt contained in the jar file.
Download package
DownloadRELEASE DATELANGUAGESIZE(Bytes)Download Options
HeapWizard11/3/2004US English64377FTP
Technical support
This utility is a product of IBM WebSphere Application Server Support. This product is provided "as is", but the author appreciates feedback. Should you have questions about this product, wish to report a problem or suggest a new feature, please send an email to ronv@us.ibm.com.











Document Information

Product categories: Software, Application Servers, Distributed Application & Web Servers, WebSphere Application Server, Java SDK
Operating system(s): AIX, Linux, Linux Red Hat - i/p Series, Linux zSeries, Multi-Platform, Windows, Windows 2000, Windows NT, Windows Server 2003, Windows XP
Software version: 3.0.2.4, 3.5.x, 4.0.x, 5.0.x, 5.1.x
Software edition: Edition Independent
Reference #: 4004782
IBM Group: Software Group
Modified date: 2004-10-15