I stopped using log rotation due to "continual failures" on many fronts
* failure of software to use a standard file (updated software does name changes and makes logs in various places)
* failure of log rotate programs to be configurable and work as expected
the above ammounts to like 100 problems that crop up and end with one or more files that infinitely grow and eventually cause a server to crawl and need reboot
HERE's WHAT I DO INSTEAD. (I run a headless server, no ups backup, and rarely ever hook a keyboard up, it's up months at a time between power losses, and it reboots without intervention)
Every server or software that creates any growing file does so in /var/log (it's a rule I enforce, it's not "automatic").
A simple cron-ized script I have indiscriminately chops all files in and under /var/log to length no matter what: there is never an over-flow.
(the only exception is a db file that records logins - but the simple script has an addition that knows the record length and chops even the db file)
Last edited by X-LFS-2010; 09-06-2018 at 06:29 PM.
|