On 16/10/2012 17:52, Shanti Suresh wrote:
> Greetings.
> 
> I have some questions on finding the number of active threads in Tomcat.
> (1) On our QA system, I notice that the currenthreadsBusy MBean is
> either zero or one for the 8443 and 8080 connectors.  

 ThreadCount != currentThreadsBusy

One is the count of threads, one is the threads that are doing work.


> Why then is ThreadCount = 93 when there is not much going on on QA?

Because you've previously done enough work for Tomcat to maintain 93
threads.


> (2) When I want to graph the thread activity in Tomcat (the thread
> Pool usage), which is a better counter to look at - currentThreadsBusy
> or "ThreadCount"?

Depends what you want know.


> It seems like "ThreadCount" is what JConsole displays as "Live Threads".
> (3) Why is TotalStartedThreadCount: 264?  Is that a cumulative total
> since Tomcat was restarted?

Yes.


p

> --------------Thread-related MBean snippet:---------
> 
> Name: Catalina:type=ThreadPool,name="http-apr-8443"
> currentThreadsBusy: 1
> ...
> 
> Name: Catalina:type=ThreadPool,name="http-apr-8080"
> currentThreadsBusy: 0
> ...
> 
> Name: java.lang:type=Threading
> DaemonThreadCount: 85
> PeakThreadCount: 99
> AllThreadIds: Array[long] of length 93
>       135
>       119
>       118
>       117
> ...
> 
> CurrentThreadCpuTime: 4600000000
> CurrentThreadUserTime: 4020000000
> ThreadCount: 93
> TotalStartedThreadCount: 264
> ThreadCpuTimeSupported: true
> ...
> ---------------end of snippet------------------------
> 
> Thanks!
> 
>                          -Shanti
> 


-- 

[key:62590808]

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to