Apache log meaning of %T and %D

apache-2.2logging

As per the Apache docs, %T means the time taken to serve the request, in seconds. But there is no description about %D.

In configuration file, %T %D is written last (in LogFormat). Where in the log file, 0 is being printed in place of %T (always) and some numeric value >10000 in place of %D.

I believe that the response time must not be greater than 2-3 seconds in my case.

  • So please tell me which entry belongs to response time
  • Why is 0 being printed in place of %T?
  • What is the meaning of %D?

Best Answer

The documentation you mentioned was about Apache 1.3. Lots of things have changed since then and Apache 2 has been around for quite some time. From Apache 2.1 mod_log_config Documentation:

%D: The time taken to serve the request, in microseconds.

%T: The time taken to serve the request, in seconds.