[Pkg-awstats-devel] Bug#590074: Bug#590074: awstats: DO NOT use cron scripts to update stats database

Sergey B Kirpichev skirpichev at gmail.com
Fri Jul 23 17:54:23 UTC 2010


> No, logrotate isn't running every 10 minutes. I think you misunderstood my
> point. If logrotate runs between the 10-minute cron runs of awstats, it will
> rotate the log entries since the last 10-minute run, so the next 10-minute
> run won't be able to see it any more.

That's true.  But it's a known issue and your logrotate hint is
already documented in README.Debian for this purpose.

On Fri, Jul 23, 2010 at 9:39 PM, Jonas Smedegaard <jonas at jones.dk> wrote:
> Looks like possible language problem:
>  during != every
>  during ~= in between

Probably ;)

>>> - it wastes resources parsing the same log files every 10 minutes,
>>> especially
>>>  if they get big
>>
>> Do you mean, it parses _same_ log entires?  No, awstats doesn't do
>> such a stupid things.  Actually, it does lseek on file to the last
>> known entry and then begin parsing.
>>
>
> What if the file has been truncated or removed by logrotate?

In this case it starts from the first line of course...

Please consider to enable EnableLockForUpdate feature.  From the README.Debian:
---->8--------
Also consider enabling lock files in /etc/awstats/awstats.conf with
EnableLockForUpdate=1 so that only one AWStats update process is
running at a time.  This will reduce system resources especially if
the AWStats update process takes longer than 10 minutes to complete.
This solution has some security drawbacks: lockfile with well-known
name and writable by www-data user.
----------------->8--------

> I guess because I haven't written a proper config file yet? Anyway, it's
> still spamming my syslog *every 10 minutes*. This should at least be an
> option that's off by default.

It's a fresh install, right?

On Fri, Jul 23, 2010 at 9:39 PM, Jonas Smedegaard <jonas at jones.dk> wrote:
> I experienced cron spam too when trying to install awstats recently (and too
> busy at the time to investigate further - just cursed a bit and uninstalled
> awstats again).
>
> Possibly not a helpful comment - just want to hint that there might actually
> be an issue of cron spam in virgin installs of awstats currently.

I guess, we can disable cron jobs by default on a fresh install.  As
/etc/awstats/awstats.conf is not configured by default,

>> I'm disagree with severity.  Looks like a very
>> site-specific/workload-specific issue.  Your logrotate-based solution
>> could be suggested as an option in README.Debian for specific setups.
>>
>
> logrotate is part of the standard install for Debian webservers (at least
> apache2 and lighttpd). this is not "site specific".

Yes, but your logrotate settings is very "site specific" and far, far
away from defaults...





More information about the Pkg-awstats-devel mailing list