Apache Logging Question...
Jason Stephenson
jason at sigio.com
Tue May 20 15:14:37 EDT 2003
According to modules/http/http_request.c, ap_run_log_transaction(),
which apparently does logging, is the last function called when a HTTP
request is processed. My guess, then is that the entire time it took to
process a request is logged, including the sending of the very last
buffer of data. My reason for saying this is that just before the log
function is called, Apache calls a routine that apparently flushes the
pipeline buffer for the request, so there would be no data left on the
server to send to the client.
Of course, this is just my guess from looking over the source code
rather quickly (45 min. to 1 hour). I don't know the Apache codebase. I
didn't dig down deep into the code and check for concurrency of these
functions, but I'm guessing that the flush completes (or times out)
before the log is written.--Unless the flush function does a fork() in a
non-threaded server, it would have to.
Oh, and I was looking at the source for Apache HTTPd v. 2.0.45. Apache
1.3.x might do it differently.
check this out: http://httpd.apache.org/docs-2.0/developer/ for more
information. You'll particularly want to look at the External Reources
sections as there are browseable source code files and source
documentation there.
Tilly, Lawrence wrote:
> I have a question about a logging option in Apache and hope someone can
> point me in the right direction.
>
> There is a %T flag for custom logging which writes the "time taken to
> serve the request (in seconds)". However, I cannot find a definition of
> what is included in "serving the request". I have been doing
> performance testing work for a couple years and I have seen this type of
> term used in a couple ways:
>
> * Time from the server receiving the request to returning an ack
> (I doubt it's this)
> * Time from the server receiving the request to when it sends back
> the first buffer of the response (this is the most common)
>
> * Time from the server receiving the request to when it sends back
> the last buffer of the response (not very common)
>
> I have read thru at least a dozen pages I was pointed to by google, as
> well as on the apache and apacheweek sites, and am not finding a
> definition of exactly what the start / end points are of "serve the
> request". If anyone knows (especially with a link to some
> documentation) I greatly appreciate it!
>
> advTHANKSance!!!
>
> -Lawrence
>
More information about the gnhlug-discuss
mailing list