Gnuru.org
Productive Linux


Subscribe

 Subscribe via Feedburner in a reader

Enter your email address:

Delivered by FeedBurner


Login
Login:
Password:



Don't have an account?
Sign up to Gnuru.org
Forgot your password?

Logrotate can crash your daemons!
5 March 2004 @ 17:14 GMT
by Nomad

Log management is one of those essential jobs that needs to be done, otherwise your logs just grow and grow and grow and before you know it you've got no space left on your hard disk.

That's why you need a utility like logrotate. It runs through your log files and compresses them. I've found though, that there can be problems. If one of logrotate's config files (stored in /etc/logrotate.d/ in Debian) relates to a missing daemon or there are some missing logs that logrotate tries to rotate, it can exit with an error. Then daemons running on the machine can crash. I've had this issue with mysql - logrotate removed the file 'mysql.log' and as a consequence the mysql daemon wouldn't restart.

The solution was simple: I read the emails that logrotate sends when it exits with an error and fixed whatever was the problem. Also, if you remove daemons from your machine make sure that logrotate's config files are fixed so that it doesn't try to handle the log files of daemons that no longer exist.

Logrotate is availble here




Comments disabled