You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Mendiratta, Shashank" <Sh...@intuit.com> on 2012/02/10 14:42:27 UTC

Not able to get threadcount and thread busy metrices in Tomcat 7.0

Hi ,

I am facing a problem. We used to monitor tomcat JVM and used to monitor
" current ThreadCount " and "current Threadbusy" 

 Recently we upgraded from tomcat 6.0 to tomcat 7.0.16 and we are not
able to get these metrices . 

 On digging in we found that in tomcat6.0 the thread pool metrices were
retrieved by class "org.apache.tomcat.util.threads.ThreadPool "

But in tomcat 7.0 there is no such class instead it is replace by
org.apache.tomcat.util.threads.ThreadPoolExecutor which does not give
the above parameters. 

 So my question is tomcat 7.0 how can we get the above metrices

 P.S- > Am new to tomcat so please bear if it is a silly question

 

Regards

Shashank 


Re: Not able to get threadcount and thread busy metrices in Tomcat 7.0

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Shashank,

On 2/10/12 8:42 AM, Mendiratta, Shashank wrote:
> I am facing a problem. We used to monitor tomcat JVM and used to
> monitor " current ThreadCount " and "current Threadbusy"
> 
> Recently we upgraded from tomcat 6.0 to tomcat 7.0.16 and we are
> not able to get these metrices .
> 
> On digging in we found that in tomcat6.0 the thread pool metrices
> were retrieved by class "org.apache.tomcat.util.threads.ThreadPool
> "
> 
> But in tomcat 7.0 there is no such class instead it is replace by 
> org.apache.tomcat.util.threads.ThreadPoolExecutor which does not
> give the above parameters.

What about these methods in the ThreadPoolExecutor's superclass:

  getCorePoolSize
  getActiveCount

Those appear to be exactly what you're looking for.

You could also use JMX if you were so inclined.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk81PXMACgkQ9CaO5/Lv0PBH4wCfahdW1zxzYczG9B/CsSHAk95c
7q0AoMK71FGkaDUUVSFBvpumg+qQsc+S
=CE3k
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org