jump to navigation

Log rotation for BOINC December 30, 2007

Posted by gnukathryn in BOINC, Configuration, Utilities.
trackback

If you’ve followed Eric’s instructions for installing BOINC as a daemon, then you may have found out that the messages you see in the message tab are captured in boinc.log. Any errors are captured in error.log. Here’s the problem. There’s no built in way to rotate those logs. So boinc.log and error.log keep growing and growing and… well you get the picture. And the last thing you want to do is run out of disk space. That’s never pretty. Never fear, there’s a handy dandy cron job that runs daily called logrotate. And it does exactly what it says it does. To rotate your BOINC logs you have to create a configuration file and place it in /etc/logrotate.d. The following is my configuration file. See man logrotate for full details on the options for the configuration file.

Just remember to use the correct path to the logs. Your’s may be in /home/boinc/ or some other location.

# Log Rotation for BOINC Daemon Logs
#
# See http://boinc.berkeley.edu/
# for more information about BOINC
#
# Daemon is stopped and then restarted
# after the logs are rotated.
#
# On restart, all results that checkpoint
# will fall back to the last one, if it exists.
# On restart, all results that did not checkpoint
# will start from the beginning.
#
# Author: Kathryn Marks
# kathryn.boinc@gmail.com
#
# Created: October 6, 2007
# Last Modified: December 28, 2007
#########################################

# Global Parameters

missingok
compress
delaycompress
notifempty
nomail

# Log Specific Parameters

# boinc.log
# Normal usage:
# Rotate weekly and keep about 2 months worth

/var/lib/boinc/boinc.log
{
weekly
rotate 8

create 664 boinc boinc
sharedscripts
prerotate
/etc/init.d/boinc stop
endscript
postrotate
/etc/init.d/boinc start
endscript
}

# error.log
# Normal usage:
# Rotate monthly and keep about 2 months worth

/var/lib/boinc/error.log
{
monthly
rotate 2

create 664 boinc boinc
sharedscripts
prerotate
/etc/init.d/boinc stop
endscript
postrotate
/etc/init.d/boinc start
endscript
}

## EOF ##

Comments»

No comments yet — be the first.