ZoneO-tips for Mandriva Linux

Rotate your log files!

Files in the folder /var/log/ are enormous and fill up my hard drive! What the heck?!

 
 

I add the strange impression that my disk was filling up for some reason, but could not find where. Finally, I got it... The directory /var/log/ had more than 1Gig of data. The logs had not been rotated for 3 months...

For those who do not know, Linux keeps track of everything happening to the system (someone trying to login, file transfers...) so you have to archive and destroy those files on a regular basis otherwise, you'll be in trouble.

There is a utility to take care of that: logrotate, and, for some reason, it was not running properly. I gave it a try by hand and realized it was crashing on this:

    error: error accessing /var/log/httpd: No such file or directory
    error: apache:1 glob failed for /var/log/httpd/*log
And then I remembered I installed a webserver, briefly, a few months ago but did not completly clean it up... There were some apache packages left.

Anyway, went into the control center, removed all packages related to apache, rotated the logs, and the problem was solved.

Also, if your computer does not run 24 hours a day, the "logrotate" command will not run properly as it is supposed to start in the middle of the night. You have to install the package "anacron" and it will start whenever needed...

09/2003
Edited et reformated 01/2006
 

ffd, 18 June 2007

XZCSADCASD

Add a comment

Name:
Email or URL: (optional)
Security code
Code shown above:
 
 
© ZoneO-soft - Contact us - Start page