Getting a Heap Dump or Thread Dump Via the Grid Agent

When troubleshooting problems, it may be useful to get a heap dump or a thread dump from individual grid nodes (JVMs). As described in Viewing Threads, you can view threads interactively in the Grid Management UI. However, if the node (JVM) that you want to get the thread dump from is experiencing severe problems, it may not be possible to retrieve it interactively. Described below is an alternative way of retrieving the thread dump via the grid agent. This mechanism also provides you with the possibility to download a heap dump.

Note: This feature is only available for grid nodes running a Sun/Oracle JVM.

To get a heap dump or thread dump via the grid agent

  1. Navigate to the Topology View page in the Grid Management pages.
  2. Each host has a separate grid agent. Click on the Agent link in the Name column for the grid agent that is running on the same host as the grid node you want to get the dump files from.
  3. Click the Advanced link.
  4. Click the Process Utilities link.

    A list of grid nodes running on this host will be displayed.

    Note:  If the link is missing, you need to enable the "Show Developer Features" option. Do this by clicking the small icon depicting a screwdriver and wrench in the upper right corner of the management pages. In the dialog box that appears, make sure to check the "Show Developer Features" check box.
  5. Identify the node you want to work with and click either the Heap Dump link or the Thread Dump link, depending on what you want.
  6. After you click on either of the two links, a new link will be added at the bottom of the page with a link to the dump file that was generated. Clicking on that link to download the dump file and save it locally on disk.
  7. To view the thread dump, open it in any text editor.
  8. To view the heap dump, you need a tool that can view the specific binary format of the dump files. Sun/Oracle provide a tool called jhat as part of their JDK that can be used to view this kind of file. After downloading the heap dump, use the jhat tool in the JDK to view the heap dump.