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 <[email protected]> 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 awstatslogrotate every 10 minutes - could be the source of trouble. Not awstats.
Looks like possible language problem: during != every during ~= in betweenIf 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 minutesWhy 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 <[email protected]> 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
signature.asc
Description: Digital signature

