Bug 57004

Summary: Get number of stuck threads from StuckThreadDetectionValve through jmx
Product: Tomcat 8 Reporter: Jiří Pejchal <jiri.pejchal>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: P2    
Version: 8.0.x-trunk   
Target Milestone: ----   
Hardware: All   
OS: All   
Attachments: Patch for getting stuckThreadCount through jmx

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.