Aaron Crane perl at
Fri Mar 10 13:30:00 GMT 2006

Peter Haworth writes:
> On Thu, 9 Mar 2006 23:42:50 +0000, Aaron Crane wrote:
> > you can't guarantee that a single Apache log file contains no
> > out-of-order lines [...] you're at the mercy of scheduling vagaries.
> Not to mention the time it takes to serve the requests. The time
> logged in the file is the time the request was received, not the time
> it finished processing.

Ah, good point.  So if you serve a big file to someone on a slow link,
the log line for that request is going to be out of order by at least as
long as they took to download the thing.  Which could be many minutes,
or perhaps even hours for CD images and the like.

> Fortunately the docs say 'AWStats has an advanced parsing algorithm
> that is able to count correctly visits, entry and exit pages even if
> log file is only "nearly" sorted.'

Now, I wonder what they mean by "nearly" sorted.

> While attempting to figure out how this works (and failing), I found
> this fabulous Y2K bug:
>   if ($year < 100) { $year+=2000; } else { $year+=1900; }

That gets funnier every time I look at it, though perhaps it would be
less so if I were still using Awstats.

Aaron Crane

More information about the mailing list