Skip site navigation (1)Skip section navigation (2)
Date:      29 Mar 2000 16:09:23 -0500
From:      Arcady Genkin <a.genkin@utoronto.ca>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: apache logs unsorted
Message-ID:  <87og7xzdoc.fsf@tea.thpoon.com>
In-Reply-To: Charles Randall's message of "Wed, 29 Mar 2000 15:44:58 -0500"
References:  <5FE9B713CCCDD311A03400508B8B30137DABC5@bdr-xcln.is.matchlogic.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Charles Randall <crandall@matchlogic.com> writes:

> Apache makes no guarantee on the ordering of log records. The time
> recorded is the time that the request started. When the request
> ends, the log record is written.

It looks like the log record is not written right away. I have turned
on logging of time taken to serve requests (as you suggest below), and
they show as zeros for some experimental requests (connecting from
local LAN). However, I waited *forever* for the corresponding records
with my IP to appear in the log. I gave up and restarted the
daemon. Only then did the records get written.

So, it seems like apache caches info before writing it into log. I
guess this is a good feature, saving some HD seeks. I was only
confused when the logging behavior changed after I installed
apache-php3 in place of plain apache. I guess I'll sort the records
before feeding them to my little script.

Maybe some config file option controls this logging behavior...

> If you use Apache's configurable logging,
> 	http://www.apache.org/docs/mod/mod_log_config.html
> you can specify a log record format that includes "%T" to record the
> elapsed time (in integer seconds) to process the request. I'd
> suggest that you enable this and hunt down your longest requests.

Thanks for the link!
-- 
Arcady Genkin                                 http://www.thpoon.com
Nostalgia isn't what it used to be.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87og7xzdoc.fsf>