[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 16:46:27 UTC 2010


On Fri, Jul 23, 2010 at 4:31 PM, Ximin Luo <infinity0 at gmx.com> wrote:
> Currently this package installs a cron job that runs every ten minutes. This
> is a VERY bad idea:
>
> - if logrotate(8) runs during those 10 minutes, some log entries will fail to
>  be accounted for by awstats

logrotate every 10 minutes - could be the source of trouble.  Not awstats.

> - 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.

> - it makes logcheck(8) spam my inbox every hour due to the cron job failing
>  every 10 minutes

Why exactly it fails?  Do you try first to comment out crontab entry
and fix the source of failure?

> A better solution is to hook the update script onto the logrotate(8) entries
> for any installed webservers (eg. /etc/logrotate.d/lighttpd,apache2). This
> solves all of the 3 problems I just mentioned.

> Package: awstats
> Version: 6.9.5~dfsg-2
> Severity: important

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.

On Fri, Jul 23, 2010 at 5:31 PM, Jonas Smedegaard <jonas at jones.dk> wrote:
> Frequent updates of logfiles have its use too, however.  But not always -
> and the backsides you raise here are valid.

True.

> I suggest to a) split the current cron job into infrequent and frequent
> jobs, b) make the frequent one optional (ideally through debconf), and c)
> invoke the infrequent job also (or instead?) as a logrotate hook.

How to split a) or c)?  It's easy only from the local admin side.

We can make cron job frequency to be debconfigured.  Is it an option?





More information about the Pkg-awstats-devel mailing list