Current thread count monitoring

View: New views
7 Messages — Rating Filter:   Alert me  

Current thread count monitoring

by Amit Bhargava :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'm new to Tomcat monitoring. I have an installation of Tomcat 5.5 on
Windows 2003 server. I am trying to monitor Tomcat using JConsole (part
of JDK 6). Could someone please tell me how I can get the current thread
queue length in Tomcat?

Regards,
Amit


---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Current thread count monitoring

by Johnny Kewl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


---------------------------------------------------------------------------
HARBOR: http://coolharbor.100free.com/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
---------------------------------------------------------------------------
----- Original Message -----
From: "Amit Bhargava" <amit.bhargava@...>
To: <users@...>
Sent: Wednesday, May 14, 2008 1:43 PM
Subject: Current thread count monitoring


> Hi,
>
> I'm new to Tomcat monitoring. I have an installation of Tomcat 5.5 on
> Windows 2003 server. I am trying to monitor Tomcat using JConsole (part of
> JDK 6). Could someone please tell me how I can get the current thread
> queue length in Tomcat?
>
> Regards,
> Amit

You have to add something like this to Java Opt
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port="9004"
-Dcom.sun.management.jmxremote.authenticate="false"
-Dcom.sun.management.jmxremote.ssl="false"

Enter in the Java Tab of the service console, if you using a windows
service.

Then TC knows you want to JMX

Then in the JDK/bin you start JConsole
tell it Remote localhost:9004

Then stuff will start happening...
Look at Mbeans Tab
Catalina/Threadpool/http-8080/attributes
and choose the thread details you need.
CurrentThreadCount
CurrentThreadBusy

etc...

>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@...
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Current thread count monitoring

by Amit Bhargava :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi John,

Thank you very much for your prompt reply. I am able to connect to the
MBean using JConsole and see values for CurrentThreadCount etc.

My understanding is that 'maxThreads' determines how many threads will
be created by the Connector to deal with requests. After this,
'acceptCount' determines the number of threads which will be allowed to
wait in queue. So is the current queue length that I am looking for  
CurrentThreadCount - maxThreads?

Thanks again.

Regards,
Amit




Johnny Kewl wrote:

>
> ---------------------------------------------------------------------------
>
> HARBOR: http://coolharbor.100free.com/index.htm
> The most powerful application server on earth.
> The only real POJO Application Server.
> ---------------------------------------------------------------------------
>
> ----- Original Message ----- From: "Amit Bhargava"
> <amit.bhargava@...>
> To: <users@...>
> Sent: Wednesday, May 14, 2008 1:43 PM
> Subject: Current thread count monitoring
>
>
>> Hi,
>>
>> I'm new to Tomcat monitoring. I have an installation of Tomcat 5.5 on
>> Windows 2003 server. I am trying to monitor Tomcat using JConsole
>> (part of JDK 6). Could someone please tell me how I can get the
>> current thread queue length in Tomcat?
>>
>> Regards,
>> Amit
>
> You have to add something like this to Java Opt
> -Dcom.sun.management.jmxremote
> -Dcom.sun.management.jmxremote.port="9004"
> -Dcom.sun.management.jmxremote.authenticate="false"
> -Dcom.sun.management.jmxremote.ssl="false"
>
> Enter in the Java Tab of the service console, if you using a windows
> service.
>
> Then TC knows you want to JMX
>
> Then in the JDK/bin you start JConsole
> tell it Remote localhost:9004
>
> Then stuff will start happening...
> Look at Mbeans Tab
> Catalina/Threadpool/http-8080/attributes
> and choose the thread details you need.
> CurrentThreadCount
> CurrentThreadBusy
>
> etc...
>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@...
>> To unsubscribe, e-mail: users-unsubscribe@...
>> For additional commands, e-mail: users-help@...
>>
>>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@...
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


RE: Current thread count monitoring

by Caldarale, Charles R :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> From: Amit Bhargava [mailto:amit.bhargava@...]
> Subject: Re: Current thread count monitoring
>
> My understanding is that 'maxThreads' determines how many
> threads will be created by the Connector to deal with
> requests.

That's the maximum number of threads for the <Connector>; if there are
fewer active requests than that, there will be fewer threads in the
pool.

> After this, 'acceptCount' determines the number of threads
> which will be allowed to wait in queue.

No, it's the number of *requests* that wait in the queue, until one or
more threads become available to process them.

> So is the current queue length that I am looking for  
> CurrentThreadCount - maxThreads?

No.  I don't believe there's a means of determining the number of
requests in the queue since the waiting requests are sitting in the
TCP/IP stack, not in Tomcat (I think - I haven't looked at that area of
the code, and it may vary depending on the connector class).

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Current thread count monitoring

by Amit Bhargava :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Chuck,

Thank you for the clarifications. I guess I'll experiment with perfmon
to see what I can dig up...

Regards,
Amit



Caldarale, Charles R wrote:

>> From: Amit Bhargava [mailto:amit.bhargava@...]
>> Subject: Re: Current thread count monitoring
>>
>> My understanding is that 'maxThreads' determines how many
>> threads will be created by the Connector to deal with
>> requests.
>>    
>
> That's the maximum number of threads for the <Connector>; if there are
> fewer active requests than that, there will be fewer threads in the
> pool.
>
>  
>> After this, 'acceptCount' determines the number of threads
>> which will be allowed to wait in queue.
>>    
>
> No, it's the number of *requests* that wait in the queue, until one or
> more threads become available to process them.
>
>  
>> So is the current queue length that I am looking for  
>> CurrentThreadCount - maxThreads?
>>    
>
> No.  I don't believe there's a means of determining the number of
> requests in the queue since the waiting requests are sitting in the
> TCP/IP stack, not in Tomcat (I think - I haven't looked at that area of
> the code, and it may vary depending on the connector class).
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@...
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>  


---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Current thread count monitoring

by DaveyS :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

You could use a J2EE monitoring solution such as FusionReactor:

http://www.fusion-reactor.com/

We have a Demo on our site and you can get lots of feedback including JDBC monitoring. Not to mention the overhead per request is sub millisecond.

Regards,
D

Amit Bhargava wrote:
Hi,

I'm new to Tomcat monitoring. I have an installation of Tomcat 5.5 on
Windows 2003 server. I am trying to monitor Tomcat using JConsole (part
of JDK 6). Could someone please tell me how I can get the current thread
queue length in Tomcat?

Regards,
Amit


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

Re: Current thread count monitoring

by Amit Bhargava :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Dave,

Thanks for the link. Will try it out.

Regards,
Amit


DaveyS wrote:

> Hi,
>
> You could use a J2EE monitoring solution such as FusionReactor:
>
> http://www.fusion-reactor.com/ http://www.fusion-reactor.com/ 
>
> We have a Demo on our site and you can get lots of feedback including JDBC
> monitoring. Not to mention the overhead per request is sub millisecond.
>
> Regards,
> D
>
>
> Amit Bhargava wrote:
>  
>> Hi,
>>
>> I'm new to Tomcat monitoring. I have an installation of Tomcat 5.5 on
>> Windows 2003 server. I am trying to monitor Tomcat using JConsole (part
>> of JDK 6). Could someone please tell me how I can get the current thread
>> queue length in Tomcat?
>>
>> Regards,
>> Amit
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@...
>> To unsubscribe, e-mail: users-unsubscribe@...
>> For additional commands, e-mail: users-help@...
>>
>>
>>
>>    
>
>  


---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...