Add to Favourites Add to Favourites    Print this Article Print this Article

Make the bandwidth, diskusage and webalizer stats update more often

Cron is the tool used to control the frequency of the stats tally.  You can easily change how often it will happen by simply modifying the cron job.

Cron file for RedHat:  /etc/cron.d/directadmin_cron
Cron file for FreeBSD:  /etc/crontab

Edit the cron file and locate the line that looks like the following:

10 0 * * * root echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue

That means that the tally will be run 10 minutes after midnight every day.

If you'd like to (for example) run the tally every 4 hours, you'd change it to:

10 */4 * * * root echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue

One important thing to remember is that for very large servers, with upwards of 1000 domains, the tally can take a significantly long time to run (up to 2 hours), so if you run a large server, you may not want to run the tally too often.

Once you've set the value you want, save the file and reload the cron daemon:

killall -HUP crond

Was this answer helpful?

Also Read