IBM Support

How to get a thread dump of the HT Web Server agent running on Linux.

Technical Blog Post


Abstract

How to get a thread dump of the HT Web Server agent running on Linux.

Body

At times, you might need to get a thread dump to see what threads are being used by your khtagent (or any other agent running on Linux.)   This is useful if you find hung threads, or if you are experiencing high CPU issues.   By default, you will not get a thread dump if you do "kill -3 <pid>".  So to enable the thread dumps, please do these steps.  Note this is written specifically for the khtagent (HT agent) running on Linux.

1. cd $ITM_HOME/lx8266/ht/config and open the file khtwb.properties file after you make a backup first:

2. Towards the bottom of the file, comment out the -Xrs arm and add -Xdump:java parameter, and save the file. (See screenshot below.)

3. Restart your HT agent and get the new pid.

4. Use the kill -3 <pid> command which will dump a javacore file as follows.

5. Once you have the javacore file, simply open it and see the top threads causing the issue.  See the screenshots below for reference.

image

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

image

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

image

 

 

Good luck. :-)

Noel Lewis

ITCAM / APM L2 Support team

 

Tutorials Point

 

Subscribe and follow us for all the latest information directly on your social feeds:

 

 

image

 

image

 

image

 

 

  

Check out all our other posts and updates:

Academy Blogs:https://goo.gl/U7cYYY
Academy Videos:https://goo.gl/FE7F59
Academy Google+:https://goo.gl/Kj2mvZ
Academy Twitter :https://goo.gl/GsVecH


image

[{"Business Unit":{"code":"BU004","label":"Hybrid Cloud"},"Product":{"code":"","label":""},"Component":"","Platform":[{"code":"","label":""}],"Version":"","Edition":""}]

UID

ibm11084533