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

Jonas Smedegaard jonas at jones.dk
Fri Jul 23 13:31:27 UTC 2010


Hi Ximin,

On Fri, Jul 23, 2010 at 01:31:57PM +0100, Ximin Luo 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
>
>- it wastes resources parsing the same log files every 10 minutes, especially
>  if they get big
>
>- it makes logcheck(8) spam my inbox every hour due to the cron job failing
>  every 10 minutes
>
>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.

Good points!

Frequent updates of logfiles have its use too, however.  But not always 
- and the backsides you raise here are valid.

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 does that sound?


  - Jonas

-- 
  * Jonas Smedegaard - idealist & Internet-arkitekt
  * Tlf.: +45 40843136  Website: http://dr.jones.dk/

  [x] quote me freely  [ ] ask before reusing  [ ] keep private
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-awstats-devel/attachments/20100723/ce551170/attachment.pgp>


More information about the Pkg-awstats-devel mailing list