[Pkg-awstats-devel] Bug#590074: Bug#590074: Bug#590074: awstats: DO NOT use cron scripts to update stats database
Jonas Smedegaard
jonas at jones.dk
Fri Jul 23 17:39:19 UTC 2010
On Fri, Jul 23, 2010 at 08:46:27PM +0400, Sergey B Kirpichev wrote:
>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.
Looks like possible language problem:
during != every
during ~= in between
If this didn't help, please follow-up on Ximin's response instead of
mine :-)
>> - 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?
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.
>On Fri, Jul 23, 2010 at 5:31 PM, Jonas Smedegaard <jonas at jones.dk>
>wrote:
>> 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.
I must admit that I have lost track of most recent improvements by you,
but seem to recall in the past that it made sense for my local scripts
to distinguish between hevier monthly/weekly log analysis routines and
smaller hourly ones. But perhaps that was because I (for other reasons)
analyzed the files from scratch again each month...
Let's first figure out if current frequent cron job really is heavy on
system resources, and only if it is I can try elaborate more on my ideas
here.
>We can make cron job frequency to be debconfigured. Is it an option?
I would prefer to keep the cron file as a conffile and instead have the
invoked script check a flag in /etc/default/awstats if it should really
run or just quit immediately.
But again, let's first resolve if it really is necessary.
- 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/ab7eb6d8/attachment.pgp>
More information about the Pkg-awstats-devel
mailing list