httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jsl...@gmail.com>
Subject Re: [users@httpd] Log entries not sorted by time correctly
Date Fri, 09 Dec 2005 19:56:58 GMT
On 12/9/05, Causevic, Dzenan <dcausevic@navisite.com> wrote:
> We upgraded from HTTPD 1.1.3 to 2.0 and since then the log entries are not
> sorted correctly by the time.
>  We did not have this problem before upgrade. Is this a problem in 2.0 or
> did we miss something in configuration that would ensure all log entries are
> sorted by the time?
>  ----------- LOG FILE EXCERPT -------------
>  192.168.8.74 - - [06/Dec/2005:21:59:59 -0500] "GET /XXXXXXXXXXXXXXX
> HTTP/1.1" 200 12193 128599 "192.168.8.70"
>  192.168.8.70 - - [06/Dec/2005:21:59:59 -0500] "GET /" 200 12193 132562
> "192.168.8.70"
>  192.168.8.71 - - [06/Dec/2005:22:00:00 -0500] "GET /XXXXXXXXX HTTP/1.1" 200
> 53942 866046 "192.168.8.70"
>  192.168.8.70 - - [06/Dec/2005:22:00:00 -0500] "GET /" 200 53942 870060
> "192.168.8.70"
>  192.168.8.79 - - [06/Dec/2005:21:59:58 -0500] "POST /XXXXXXXXXXXXXX
> HTTP/1.1" 200 29912 2462761 "204.168.144.231"
>  204.168.144.231 - - [06/Dec/2005:21:59:58 -0500] "POST /XXXXXXXXXXXXXXXX
> HTTP/1.1" 200 29912 2466255 "204.168.144.231"
>  192.168.8.73 - - [06/Dec/2005:22:00:01 -0500] "GET /XXXXXXXXXXXXXXXXX
> HTTP/1.1" 200 31250 1006627 "192.168.8.70"
>  192.168.8.70 - - [06/Dec/2005:22:00:01 -0500] "GET /" 200 31250 1010806
> "192.168.8.70"
>
>  We use the script to analyze hits, but the script assumes entries are
> sorted by time in ascending order. This messes up the whole script. Anybody
> know how to fix this?

Sort your file before passing it to the script?

Even apache 1.3 can have out-of-order log file lines; it is just less common.

Apache 2.0 logs the time a request was received, so it will obviously
log requests out of order if they take different times to be served. 
If you really hate this, you can use the pre-processor define
I_INSIST_ON_EXTRA_CYCLES_FOR_CLF_COMPLIANCE when compiling
mod_log_config.  But, as I said, there is still a possibility of
out-of-order log lines.  See the comment in mod_log_config.c for more
details.

You'll also want to make sure you haven't turned on buffered logs, of course.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message