Finding high-CPU threads when the Node is running with 100% CPU usage.

Finding high-CPU threads when the Node is running with 100% CPU usage.

book

Article ID: KB0087513

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix Service Grid -
TIBCO BPM Enterprise (formerly TIBCO ActiveMatrix BPM) -
TIBCO ActiveMatrix BusinessWorks Service Engine -

Description

Description:
A Node in TIBCO ActiveMatrix is a JVM instance. There are approaches at the operation system level to determine high-CPU threads when a JVM is running with high CPU foot prints.

Issue/Introduction

Finding high-CPU threads when the Node is running with 100% CPU usage.

Resolution

On a Linux platform:

1). Run 'top'
2). Press Shift-H to enable Threads View.
3) Get the PID (i.e., 'PID' column) of the thread with the highest CPU usage.
4). Convert the PID (in Decimal format) to HEX  (e.g., using an online Decimal-to-HEX convertor).
5). Obtain a thread dump of the Java process that contains thread native IDs nid (e.g., using "jstack" etc.).
6). In a thread dump, look for a thread with the matching HEX PID (i.e., the 'nid=0x..' field).

On a Windows platform:

1). Download and open ProcessExplorer.
2. Open the Node in ProcessExplorer. In the thread tab, find out the high-cpu TID.
3). Convert the TID (in Decimal format) to HEX  (e.g., using an online Decimal-to-HEX convertor).
4). Obtain a thread dump of the Java process that contains the thread native IDs nid (e.g., using "jstack" etc.).
5). In the thread dump, look for a thread with the matching HEX TID (i.e., the 'nid=0x..' field).

Additional Information

Multiple relevant resources are available in the Java community.

http://code.nomad-labs.com/2010/11/18/identifying-which-java-thread-is-consuming-most-cpu/