• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Complete Server status Page in Tomcat Manager

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hello All,

I am using mod_jk connector and the tomcat server to receive and process the incoming Http requests for my website. When i log in to Tomcat manager, in the server status page i can see the following for jk-8009:

Max threads: 200 Current thread count: 56 Current thread busy: 21
Max processing time: 211187 ms Processing time: 5520.54 s Request count: 28424 Error count: 1446 Bytes received: 0.13 MB Bytes sent: 1155.16 MB

My question is: How can i find out the Current thread count for my connector using the java code/unix command/any other possible way ?

My task is to keep track of the current thread count using java code/unix command/any possible way and inform the admin when my connector current thread count reaches 180.

Could anyone suggest me the ways to implement this?

Thank you in advance.

-Ratna.
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Ratna!

Obsessing over stuff like this only makes sense when you have actual problems that need resolving. At that time the busy thread count is far more important than the "current" thread count, since that's just the threadpool size. And even then, it's only important if you are jamming up because of too few available threads. And even before that, it would be worth investigating why the pool was running dry, since it might be an indication that the actual webapps aren't running efficiently.

If you do have a need to track stuff like that, the Tomcat Manager webapp is really only a big-picture view. To get minuscule internal details, JMX is probably better.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While this doesn't help you notify someone automatically, http://code.google.com/p/psi-probe/ is the best Tomcat monitoring web app out there, IMO. It far surpasses Tomcat's built-in stuff.
 
reply
    Bookmark Topic Watch Topic
  • New Topic