Bug 57004 - Get number of stuck threads from StuckThreadDetectionValve through jmx
Get number of stuck threads from StuckThreadDetectionValve through jmx
Status: RESOLVED FIXED
Product: Tomcat 8
Classification: Unclassified
Component: Catalina
8.0.x-trunk
All All
: P2 enhancement (vote)
: ----
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2014-09-22 20:59 UTC by Jiří Pejchal
Modified: 2014-09-23 13:00 UTC (History)
0 users



Attachments
Patch for getting stuckThreadCount through jmx (1.37 KB, patch)
2014-09-23 12:34 UTC, Jiří Pejchal
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jiří Pejchal 2014-09-22 20:59:14 UTC
It would be nice if the number of stuck threads reported by StuckThreadDetectionValve was available through jmx (e.g. stuckThreadCount).

The number of stuck threads is stored in the stuckCount variable. However there is no jmx attribute for it, there is only getter for stuckThreadIds which is long[].


I usually use tool like jmxtrans to get the value and plot a graph with graphite.
Comment 1 Jiří Pejchal 2014-09-23 12:34:05 UTC
Created attachment 32045 [details]
Patch for getting stuckThreadCount through jmx

This would be nice to have in tomcat7 too.
Comment 2 Christopher Schultz 2014-09-23 13:00:27 UTC
Fixed in trunk in r1626991. Will be in Tomcat 8.0.13 and later.
Fixed in Tomcat 7. Will be in Tomcat 7.0.56 and later.