rishel.org

8/28/2008

Proliant Blade running RHEL5, you’ll need a cma.log rotation script

No one seems to have written a log rotation script for the Proliant Support Pack logs that are stored in /var/spool/compaq/cma.log, so I thought I'd throw mine up here in case someone else needs one. put this in a file called "cma" in /etc/logrotate.d/

/var/spool/compaq/cma.log {
compress
missingok
size=100M
postrotate
/sbin/service hpasm restart 2> /dev/null > /dev/null || true
endscript
}

That's it. this will be picked up by the daily cronjobs and keep things from getting messy. if you want to test your config without doing any changes, run logrotate -d /etc/logrotate.conf which will output the work it plans on doing. If your big log hasn't rotated in that example, run logrotate -f /etc/logrotate.conf which force the job to run. those 6 gigs of logs are now a tidy 39 megs.

Filed under: General, Linux — Jay @ 7:02 am

Powered by WordPress