Monday, December 12, 2011

Measuring Repsonse time of IBM HTTP Webserver

Response times can be found in the access log file identified by either the TransferLog or CustomLog directives defined in the IBM HTTP Server's httpd.conf file as long as the LogFormat directive is modified to include either the %D or %T format parameters. In addition to these two parameters, the LogFormat should be updated with a constant string (e.g. TIME:) that can be used to easily identify the response times in the access log. The %D parameter will report the time taken to serve the request, in microseconds, while the %T will report the time taken to serve the request in seconds.
The following example shows how to modify the default common LogFormat found in the httpd.conf file to report the time in microseconds.
Original definition:
LogFormat "%h %l %u %t \"%r\" %>s %b" common
CustomLog logs/access.log common

Which will produce output similar to the following: - - [04/Nov/2011:21:06:05 -0400] "GET / HTTP/1.1" 200 3325

Change to:
LogFormat "%h %l %u %t \"%r\" %>s TIME: %D %b" common
CustomLog logs/access.log common

Example output found in the access.log will look like the following: - - [04/Nov/2011:21:06:05 -0400] "GET / HTTP/1.1" 200 TIME: 78125 3325

The text in bold blue shows the response time in microseconds.

With this information, you can now parse the access log looking for requests that meet specific response time criteria. 

No comments:

Post a Comment