Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I log Apache's performance, i.e. how it takes to process a request? Similar to Tomcat's Valve concept, I'd like to add this logging on Apache to identify a bottleneck on my web app.

I'm using Apache and Tomcat via mod_jk.

share|improve this question
up vote 2 down vote accepted

You have to create a new log format that adds on response time.

LogFormat "\"%{%Y-%m-%d %H:%M:%S}t\" %V %m \"%U\" \"%q\" %{Content-Type}o %s %B %O %D" responsetime
CustomLog "/var/log/apache2/responsetime.log" responsetime

The %D adds the response time in microseconds to the log. So you can always make your own format for the access log just include the %D somewhere in the log

share|improve this answer
Add that to httpd.conf? – Kevin Meredith Jun 13 '13 at 14:51
yep you can add it there or in a vhost entry – Mike Jun 13 '13 at 14:53
Thank you, Mike – Kevin Meredith Jun 13 '13 at 14:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.