Show TOC

Function documentationThread Dump Analysis Locate this document in the navigation structure

 

The Thread Dump Analysis component of SAP Solution Manager diagnostics can be used for central triggering and scheduling of JVM based thread dumps for certain or all J2EE node(s) The gathering and transfer of generated thread dumps and the analysis of the thread dump data is done with an appropriate user interface panel.

A thread dump is a snapshot of the state of all the Java threads. The JVM is in charge of allocating and de allocating memory to Java Applications. It manages the memory using a special agent, Garbage Collections (GC), which is part of the JVM. There are two types of GCs that occur, regular and full GCs. They collect the memory that is no longer being used by Java applications, and returns it to the heap.

Prerequisites

  • Make sure that the -Xrs option is not used in the instance.properties file of the JVM.

  • To analyze thread dump from an uploaded file, you need to generate the thread dump on the source system manually.

Activities

Using Thread Dump Analysis you are able to count the threads used, see to which method they belong to and what task they were performing. A full thread dump is a request to the Java Virtual Machine to “dump” its current state.

In the Offline Tools navigation area of the work center Root Cause Analysis, perform the following steps to perform the listed tasks:

1.) Trigger Full Thread Dumps for All Nodes:
  1. Select Thread Dump Analysis in the Offline Tools navigation area.

  2. In the section of Select J2EE Nodes, select all the nodes listed, and click the Trigger Dump pushbutton.

2.) Trigger Full Thread Dumps for Selected Nodes:
  1. Select Thread Dump Analysis in the Offline Tools navigation area.

  2. In the section of Select J2EE Nodes, select the desired nodes.

  3. Click the Trigger Dump pushbutton.

3.) Trigger Full Thread Dumps at Intervals:
  1. Select Thread Dump Analysis in the Offline Tools navigation area.

  2. In the section of Trigger a Series of Full Thread Dumps, define an interval and the number of dumps to repeat triggering thread dumps.

  3. Click the Start now pushbutton.

4.) Analyze Full Thread Dumps for Selected Nodes:
  1. Select Thread Dump Analysis in the Offline Tools navigation area.

  2. In the section of Select J2EE Nodes, select the desired nodes.

  3. Click the Trigger Dumps pushbutton. When the dumps are available, click the Analyze button.

5.) Analyze Full Thread Dumps for Uploaded File:
  1. Select Thread Dump Analysis in the Offline Tools navigation area.

  2. In the section of Upload files, click the Browse pushbutton to choose a thread dump file.

  3. Click the Analyze button.

Structure

The Thread Dump Analysis displays its options on separate panel areas:

Option

Description and Use

Select J2EE Nodes

  • Select the nodes for which you want to create a thread dump

  • Trigger dump button

  • Analyze dump button

Trigger a Series of Full Thread Dumps

  • Interval (in seconds)

  • Number of dumps you wish to analyze

  • Start analyze button

  • Prepare a Scheduler Template

Upload File

  • Browse to dump file

  • Upload button

Self Test

  • Trigger a dump on all J2EE nodes in all solutions/landscape/products and check if the dumps arrive in the console logs

Results

After a thread dump has been triggered, click on the Analyze pushbutton in order to view the contents and result of the dump. A new panel appears, with a table that contains several tabs and options:

Tab Title

Description and Use

Summary

This tab is useful for comparing differences between thread dumps. For each cluster node, their log file will be displayed if any thread dumps occurred.

The summary analysis reads the console logs from the selected components and shows it in a tab. The summary table structure is independent of the chosen J2EE Node ID. It is not possible to click on ‘Restart‘ . If a dump contains a deadlock – it would be shown in summary as well.

Click on one of the thread dumps to view the Single Dump Table These columns are contained in the table:

  • Timestamp

  • Dispatcher

  • Server

All Dumps

This tab displays all the thread dumps for the selected J2EE node id. You are able to compare a large number of thread dumps at the same time in order to compare any changes. You are also given the option to download the thread dumps for offline analysis.

These columns are contained in the table:

  • Filter Threads by Application, KM, Anonymous or System

  • Group Prefix

  • Thread State – (Java state knowledge is required)

  • First non-java.* stack line

  • Total Count

  • 1 – N – however many threads there are (Click here to display thread details)

Single Dump

This tab is useful for finding out what the state of JVM threads is and identifying any type of deadlocks. You can view the thread dumps grouped by name, total number of threads, thread conditions and also the state of the threads.

These options are available to filter the table contents:

  • Dump Number

  • Filter Threads

These columns are contained in the table:

  • Group Name

  • Total (Click here to display thread details)

  • Waiting on Condition

  • Runnable

  • In Object.wait()

Threads Detail

This tab displays the details of the selected thread dump such as Native Thread Id, the condition of each thread and also a complete stack trace of a thread.

Memory Garbage Collection

This tab displays an analysis of the Garbage Collections taken during the thread dump. A general understanding of JVM memory management is required here.

With this tool you can view the garbage collection behavior in graphical form.

There are three tables displayed on this page, and these columns are contained in the table:

  • Time Frame

    • Time Frame

    • GC Type

  • Statistics

    • Start time

    • End time

    • Up Time

    • % GC Time

  • VM Parameters

    • GC Type

    • Count

    • Total Duration

    • Average Duration

    • Total Recycled Bytes

    • Average Recycled Bytes

Customer Code

All threads from the dump are scanned for any type of non-SAP standard packages. If any customer threads are found, they are displayed here. Clicking on any of the threads will display them in the Thread Details report