You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Causevic, Dzenan" <dc...@navisite.com> on 2005/12/09 20:42:10 UTC

[users@httpd] Log entries not sorted by time correctly

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?

Re: [users@httpd] Log entries not sorted by time correctly

Posted by Joshua Slive <js...@gmail.com>.
On 12/9/05, Causevic, Dzenan <dc...@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


Re: [users@httpd] Log entries not sorted by time correctly

Posted by Josh Feather <Jo...@hewitt.com>.
Try checking your log format string in httpd.conf



"Causevic, Dzenan" <dc...@navisite.com> 

12/09/2005 01:42 PM
Please respond to
users@httpd.apache.org



To
users@httpd.apache.org
cc

Subject
[users@httpd] Log entries not sorted by time correctly







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?

 
The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited.