pgowder
10-19-2001, 09:04 AM
On my RaQ, webalizer is running great for all the sites, except one (mine of course). It seems to run every other day.
This site does get a good bit of traffic.
Any ideas on this??
Thanks
dutchie
10-19-2001, 01:04 PM
I had the same problem for the big sites on my raq.
I solved it this way (credits to whomever suggested is to me).
move: /etc/cron.daily/webalizer.pl to /usr/sbin
edit : /etc/logrotate.d/apache
add: after postrotate /bin/kill -USR1 'cat /var/run/httpd.pid'
on your own risk ofcourse.
This way it has worked great for several months, until it stopped serverwide at 4 october.
Chicken
10-19-2001, 04:07 PM
Paul, follow dutchie's post. I believe that is for a RaQ4, but I can dig up the 3 as well.
Chicken
10-20-2001, 10:39 AM
Well since it wasn't stated which machine it is, here is the full version that I saved:
Posted by Felix a while back:
Both implies that you are logged in your shell and are as root.
On Raq3:
edit /etc/cron.daily/webalizer.pl
find and modify this line:
webalizer -n $asite -s $asite -r $asite -Q -T -o $thepath $prefix/$asite/logs/web.log
to
webalizer -p -n $asite -s $asite -r $asite -Q -T -o $thepath $prefix/$asite/logs/web.log
On RAQ4:
edit /usr/local/bin/webalizer.pl
find and modify this line:
system("/usr/bin/webalizer -Q -D /var/cache/dns.cache -r $domains[$i] -n $domains[$i] -o $out $in");
to
system("/usr/bin/webalizer -Q -p -D /var/cache/dns.cache -r $domains[$i] -n $domains[$i] -o $out $in");
This will add persistence to your logs, thus they will not be overwritten everytimes your logs rotate. Of course, if a site has so much traffic that its logs are rotated before webalizer analyze them, there is only a solution:
On Raq3:
edit /etc/logrotate.d/apache
and add:
/usr/local/bin/webalizer.pl
after the line:
/bin/kill -USR1 `cat /var/run/httpd.pid`
You must then move
/etc/cron.daily/webalizer.pl to /usr/local/bin/webalizer.pl
On RAQ4:
edit /etc/logrotate.d/apache
and add:
/usr/local/bin/webalizer.pl
after the line:
/usr/bin/killall -HUP httpd 2> /dev/null || true
You must then move /etc/cron.d/webalizer somewhere else (/tmp/webalizer).
This last fix has the effect of running webalizer right after apache has rotated its log but right before the other logs are rotated (i.e the sites logs).
PLEASE NOTE THAT THIS IS AN UNSUPPORTED HACK. Cobalt will NOT like the fact that you play with their configuration files and it may very well void your guarantee.
Anyhow... have fun