tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Costin Manolache" <cos...@gmail.com>
Subject Re: Measuring bytes sent and received from and to Tomcat
Date Mon, 22 Oct 2007 22:27:35 GMT
'bytes' should be counted at a lower level, in connector. I'm not sure this
is something generic enough - but you can make some changes to your tomcat,
where read() is done from socket.

I guess it would be nice to have a JMX graph with bytes/sec in/out.

Costin
'bytes'

On 10/22/07, Dave Rathnow <Dave.Rathnow@umsltd.com> wrote:
>
>
> We looked at using a valve but we weren't sure if it would work.
> Correct me if I'm wrong, but it appears as though valves are chained
> together in a calling sequence and that some valves could change the
> content of the request or response.  This means we may not get an
> accurate measure of the number of total number bytes that make up the
> request.
>
> Also, the AccessLogValve has a pattern code to get the number of bytes
> sent, excluding the HTTP headers, but does not have a pattern code to
> get the number of bytes sent, including the HTTP headers, which is what
> we really need.
>
> Have I missed something?
>
> Dave.
>
>
> -----Original Message-----
> From: yoavshapira@gmail.com [mailto:yoavshapira@gmail.com] On Behalf Of
> Yoav Shapira
> Sent: October 22, 2007 02:36 PM
> To: Tomcat Developers List
> Subject: Re: Measuring bytes sent and received from and to Tomcat
>
> Hey,
>
> On 10/22/07, Dave Rathnow <Dave.Rathnow@umsltd.com> wrote:
> > Is there a way we can do the same thing with Tomcat?  It's simple for
> > us to measure the number of byte in the payload of the HTTP
> > request/response, however that isn't enough.  We need to know the
> > total number of bytes being sent and received for each HTTP request.
> >
> > Can someone suggest a way I could get an accurate count of these
> bytes?
>
> You can probably start with the AccessLogValve that ships with Tomcat:
> http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html
>
> Out of the box it will get you the complete bytes in the response.
> See the above docs on how to configure that.  If you want to log the
> complete bytes on the request, I think you'll have to extend the Valve,
> but it should be pretty easy to do.
>
> Yoav
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional
> commands, e-mail: dev-help@tomcat.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message