On 2/18/2011 12:12 PM, Konstantin Kolinko wrote:
2011/2/18 ??G??S ???O???S<co...@hua.gr>:
Tomcat 5.5 or 6.0
Win XP or Vista (32)
I've read the configuration
(http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html) and the api
(http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/valves/AccessLogValve.html)
but there are some details that are not specified:
timestamp (%t in pattern)
In apache documentation it is stated that this is the time that the request was
received. I'd like some simple confirmation that this also holds true for the
tomcat (and is not, for example, the time that the response was sent).
bytes sent (either %b or %B in pattern)
Is this the number of bytes actually sent to the client, or simply the size in
bytes of the HTTP response (which will differ, for instance, if the connection
is aborted)? The apache httpd 2.0 provides the %O format as well to distinguish
between these two cases, whereas in 1.3 it didn't. Since tomcat does not
provide such an option, my guess is towards the number of bytes actually sent
to the client, but I'd like some simple confirmation on this.
time taken (either %D or %T in pattern)
Is the network transmission time included in the processing time? To be more
precise, is this the time the server used to process, prepare the HTTP response
and deliver it to the underlying layer for transmission (i.e. non-blocking
threads on tcp send)? Or does it also include the underlying layer sending time
(e.g. blocking threads on tcp send)? Apache's documentation is also obscure on
that point...
In short:
regarding TC 5.5 and 6.0 your hopes are wrong. The timestamp is when
the processing is the layer below the valve has ended (and the log
statement is printed), with some caching of generated timestamp string
(not worse than 1 sec). Time taken: time spend in the layer below the
valve. The size is raw size, before gzip compression.
In latest versions of TC7 (7.0.8 and later) the access valve has
different implementation, and is directly invoked from the connector
adapter layer. That version prints timestamp when request was
received, timing for the whole request processing cycle (though '0'
when it cannot be determined), reports count of bytes sent (taking
compression into account).
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
Thank you very much for the detailed answer. Now there's just one more
thing to ask.
If we use tomcat 7.0.8, the "timing for the whole request processing
cycle" will incorporate transmit time?
e.g. if using HTTP/1.0, will it represent the total time until the
teardown of the connection? Or will it be the net processing time
/before/ transmission starts (i.e. time to prepare the http response and
push it to the network layer)?