Web Hosting Talk







View Full Version : Webalizer & logrotate problem


Franki
09-17-2001, 06:06 PM
The cron runs daily the webalzer.pl script (2.01) and logrotate. I know that the scripts are running in alphabetical order, so the 'logrotate' runs first. This means that the logrotate will reset the web.log file and then the webalizer won't generate any log entries for the last day, because the web.log file is empty.

Is there any way to make 'webalizer.pl' to be executed before 'logrotate' ? I have renamed webalizer.pl -> awebalizer.pl and logrotate -> zlogrotate but after that both scripts are not running automatically, only manually. Any ideas?

Chicken
09-17-2001, 07:20 PM
You have searched the forum already eh? *hint*

CmptrWz
09-17-2001, 09:21 PM
You need to change the filenames AND the references to the files. If you don't change both it won't work.

Franki
09-18-2001, 03:11 AM
Could you please give me more help? Thank you.

Chicken
09-18-2001, 03:23 AM
Try these threads:
http://www.webhostingtalk.com/showthread.php?&threadid=11444&highlight=webalizer+logs+rotate
http://www.webhostingtalk.com/showthread.php?&threadid=7118&highlight=webalizer+logs+rotate

Lmax
09-18-2001, 07:15 AM
I've added


$messages .=
`webazolver -N15 -D /home/log/reverse.dns $prefix/$asite/logs/web.log.1.gz`;
$messages .=
`webalizer -p -n $asite -q -T -D /home/log/reverse.dns -o $thepath $prefix/$asite/logs
/web.log.1.gz`;

just below
$messages .=
`webazolver -N15 -D /home/log/reverse.dns $prefix/$asite/logs/web.log`;
$messages .=
`webalizer -p -n $asite -q -T -D /home/log/reverse.dns -o $thepath $prefix/$asite/logs
/web.log`;

THis way it alos processe the rotated log files. Works fine for me. Only problem is that it's a bit more work for the server.

diyoha
09-21-2001, 06:04 PM
added to what?

thanks

David