Skip to content
CA Application Performance Management - 10.5
Documentation powered by DocOps

Configure Thread Dumps

Last update January 30, 2017

Thread dumps can provide useful detailed information about what is happening within the agent JVM. Thread dump functionality is provided in the Thread Dumps tab associated with each agent node in the metric browser tree. Setting the Thread_Dump permission allows users to see the Thread Dumps tab and use all the functionality.

Both IntroscopeAgent.profile and IntroscopeEnterpriseManager.properties properties are required to enable thread dumps. By default, the Thread Dumps tab and its functionality are enabled. However, if either or both of the thread dump enable properties are set to false, then users cannot see the Thread Dumps tab.

If you enable or disable thread dumps on a MOM, that configuration applies to all the Collectors in the cluster. Therefore, if you disable thread dumps on a MOM, thread dumps are disabled on all the Collectors too.

To enable thread dumps

  1. Open the IntroscopeAgent.profile file in the <Agent_Home>/core/config directory and set this property:

    introscope.agent.threaddump.enable=true

  2. Save and close IntroscopeAgent.profile.
  3. Open the IntroscopeEnterpriseManager.properties file located in the <EM_Home>/config directory and set this property:

    introscope.enterprisemanager.threaddump.enable=true

  4. Save and close IntroscopeEnterpriseManager.properties.

For Introscope users to view the Deadlock Count metric, configure the IntroscopeAgent.profile. You can perform additional configuration to display agent Thread node metrics.

To enable Deadlock Count metric collection

  1. Open the IntroscopeAgent.profile file in the <Agent_Home>/core/config directory.
  2. Set this property to true to enable the Deadlock Count metric to be collected.

    introscope.agent.threaddump.deadlockpoller.enable=true

  3. (Optional) Set the full version of the PBL to display metrics in the agent Threads node.
    • Specify the name of the PBL file in this property: introscope.autoprobe.directivesFile.
      For example, to use the full version of the standard PBL for WebLogic server, set the property to:

      introscope.autoprobe.directivesFile=weblogic-full.pbl 

      User can see metrics such as Active Threads counts and thread groups under AgentName | Threads.

  4. Save and close IntroscopeAgent.profile.

Configure thread dumps using both IntroscopeAgent.profile and IntroscopeEnterpriseManager.properties properties.

To configure thread dumps

  1. Open the IntroscopeEnterpriseManager.properties file located in the <EM_Home>/config directory.
  2. (Optional) Set this property to save thread dump files to a specific directory on the Enterprise Manager. For example, TestThreadDumps.

    introscope.enterprisemanager.threaddump.storage.dir=TestThreadDumps

  3. (Optional) Set this property to purge thread dump files older than a specified number of days. For example, older than 30 days.

    introscope.enterprisemanager.threaddump.storage.clean.disk.olderthan.days=30

  4. (Optional) Set this property to purge thread dump files after a specified number of days. For example, after every two days.

    introscope.enterprisemanager.threaddump.storage.clean.disk.freq.days=2

  5. (Optional) Set this property to limit the maximum number of thread dump files that can be stored on the Enterprise Manager. For example, 5000 files.

    introscope.enterprisemanager.threaddump.storage.max.disk.usage=5000

    Note: If:* the number of thread dump files stored exceeds the limit set in the introscope.enterprisemanager.threaddump.storage.max.disk.usage property
    and
    * there are no files older than the number of days set in the introscope.enterprisemanager.threaddump.storage.clean.disk.olderthan.days property
    Then the Enterprise Manager does not store any thread dump files.
  6. Save and close IntroscopeEnterpriseManager.properties.
  7. Restart the Enterprise Manager.

If an Enterprise Manager goes down, you can copy thread dump files to another Enterprise Manager so users can view thread dump data.

Important! Restart the Enterprise Manager when you add files to or remove files from the thread dump directory. CA Technologies does not recommend moving thread dump files from one Enterprise Manager to another.

To copy thread dump files from one Enterprise Manager to another

  1. Navigate to the <EM_Home>/threaddumps directory on the Enterprise Manager containing thread dump files (EM1).
  2. Copy the thread dump files.
  3. Paste the files into the <EM_Home>/threaddumps directory on the Enterprise Manager where users are to view the thread dumps (EM2).
  4. Restart both Enterprise Managers EM1 and EM2.
  5. If needed, establish the agent connection and enable and configure thread dumps on EM2.
    EM2 users can select the agent node then click the Load Previous button in Thread Dumps tab. A list displays the thread dumps moved from EM1.

Generate a Thread Dump Using the Command-Line Workstation

You can run the Thread Dump feature from the Command-Line Workstation (CLW) to enable an alert to be triggered using a shell action. The required CLW command can be included as part of shell action and then invoked using a Shell Command Action for relevant alert. The thread dump is persisted on the Enterprise Manager.

The text format thread dump returned to the CLW client is truncated when there are more than ten elements. This setting is not configurable. The stack is the same that results when saving the thread dump from the Investigator using the option "Save as Text" button.

Note: To see the full thread dump stack, load it into the Investigator and view with any other external thread analysis tool. Using an external tool might result in errors.

Use one of the following options to collect a new thread dump file:

  • get ThreadDump for the agent matching [REGULAR EXPRESSION] for performance

This option specifies that the thread dump must not be sent back to the CLW client. and using this option causes lesser overhead to the Enterprise Manager.

  • get ThreadDump for the agent matching [REGULAR EXPRESSION] for functional

The [REGULAR EXPRESSION] in this command must match the Agent Name. In the following example, a Tomcat agent with name "*SuperDomain*|HostName|Tomcat|Tomcat_Agent" is used:

cd EM_HOME/lib

   java -jar CLWorkstation.jar get ThreadDump for the agent matching ".*HostName\|Tomcat\|Tomcat_Agent.*" for functional   

The output is:

.*HostName\|Tomcat\|Tomcat_Agent.*emConnection=available

   TD enable on EM = true

   TD enable onTomcat_Agent = true

   SUCCEESS

   "main" Id=1 RUNNABLE (in native)

Note: By default the thread dump file is created in the folder <EM_HOME>/threaddumps, where EM_HOME is the home directory of the Collector for the agent.

Use the following command to retrieve the list of already collected thread dump files:

get List of ThreadDump filenames for the agent matching [REGULAR EXPRESSION]

For example,

cd EM_HOME/lib                                                          

   java -jar CLWorkstation.jar get List of ThreadDump filenames for the agent matching ".*HostName\|Tomcat\|Tomcat_Agent.*"

The output is:

.*HostName\|Tomcat\|Tomcat_Agent.*emConnection=available

   TD enable on EM = true

   TD enable onTomcat_Agent = true

   HostName_Tomcat_Tomcat_Agent_TD_xxxxxxxxxxxxx

   HostName_Tomcat_Tomcat_Agent_TD_yyyyyyyyyyyyy

Was this helpful?

Please log in to post comments.