tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: How can I display number of requests over the past n seconds?
Date Thu, 29 Jul 2004 14:16:24 GMT
Hi,
You would need to modify your filter.  One approach would be to have
separate counters, one for each time period, with a monitor thread for
each one.  The monitor thread would sleep for the duration of the timer,
then reset it.  The Filter would initialize these counters and threads,
then increment each timer by one every time a request comes in.  The JSP
would simply read the counter values.

Yoav Shapira
Millennium Research Informatics


>-----Original Message-----
>From: tom ly [mailto:booshleeka123@yahoo.com]
>Sent: Thursday, July 29, 2004 10:11 AM
>To: tomcat-user@jakarta.apache.org
>Subject: How can I display number of requests over the past n seconds?
>
>I need to display on a .jsp page the number of requests for Tomcat in
the
>past 5 / 10 / 15/ 30 / 45 / 60 seconds.  I've already implement a
Filter
>will count the total number of requests.  I did this with a static int,
>which is incremented everytime a request comes in.  But what should I
do so
>that I can show number of request over past time intervals?  Since the
>present time is always changing, "the past n seconds" is constantly
>changing also.
>Thanks in advance,
>Tom
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com

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


Mime
View raw message