PDA

View Full Version : directadmin / awstats cron stopped working?


Guillermo
02-01-2007, 10:08 AM
Since 7.00 this morning, awstats stopped updating itself. When i run top, i see awstats.pl constantly showing up, while i'm not using it.
I have the following line in my directadmin_cron, which updates awstats each hour.

0 * * * * root /usr/local/directadmin/plugins/awstats/hooks/cgi-bin/awstats_updateall.pl now -awstatsprog=/usr/local/directadmin/plugins/awstats/hooks/cgi-bin/awstats.pl

What could be the problem?

smtalk
02-01-2007, 10:20 AM
You should run the update more rarely.

Guillermo
02-01-2007, 10:59 AM
Why? I like to watch awstats a view times a day for marketing purposes.
I have a high-end server, and the update causes nearly any load.

jlasman
02-01-2007, 11:16 AM
But if you try to start it again while it's still running you'll get the problem you're reporting.

Either put something into your cronjob to check that it's not running before restarting it, or run it less often.

Jeff

Guillermo
02-01-2007, 12:10 PM
So you mean, while it's updating (what takes 1 minute or so), i should not access awstats?

I just restarted the cron service, but the problem still persists.

I'll let awstats update each 4 hours, is that better?

--------
Edit:

I changed it to:
10 0 * * * root /usr/local/directadmin/plugins/awstats/hooks/cgi-bin/awstats_updateall.pl now -awstatsprog=/usr/local/directadmin/plugins/awstats/hooks/cgi-bin/awstats.pl && echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue


# service crond restart
Stopping crond: [ OK ]
Starting crond: [ OK ]


But it's still active...

#top
23644 root 16 0 38092 22m 1840 S 0 1.1 1:30.42 0 15m awstats.pl