IBM HTTP Server performance measurements

Technote (FAQ)


How do you measure the response time it takes for the IBM HTTP Server to handle a request?


Response times can be logged, in microseconds or seconds, 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 TIME: %D \"%r\" %>s %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 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. For example, you can use the Microsoft Windows FindStr command to parse the access log looking for response times that are greater than 1 second by using the following command in a DOS command window:

findstr /R /C:"TIME: 0 [a-fA-F0-9][a-fA-F0-9][a-fA-F0-9][a-fA-F0-9][a-fA-F0-9][a-fA-F0-9][a-fA-F0-9]" access.log

Note: The parameters passed on the FindStr command includes regular expressions searching for 7 digits following the string "TIME: ". If the response time in microseconds contains 7 or more digits, then it's greater than or equal to 1 second. If you want to locate just entries that are greater than 10 seconds, you could add another regular expression [a-fA-F0-9] to the constant string.

Related information

Logging Directives

Rate this page:

(0 users)Average rating

Add comments

Document information

More support for:


Software version:

6.1, 7.0, 8.0

Operating system(s):

AIX, HP-UX, Linux, Solaris, Windows

Reference #:


Modified date:


Translate my page

Machine Translation

Content navigation