We use webalizer to generate reports on our Apache access logs - it is useful in conjunction with Google Analytics.
The problem is that webalizer uses ALOT of CPU when running. If I run top
I can see two perl processes with 90% CPU - this slows down the machine and therefore the website for our users.
Webalizer is run via a daily cron job (/etc/cron.daily/00webalizer
):
#! /bin/bash
# update access statistics for the web site
if [ -s /var/log/httpd/access_log ]; then
exec /usr/bin/webalizer -Q
fi
Does anyone know how to limit how much CPU webalizer can use? For example, would nice
help and how would I use it?