How to housekeeping OMSA TTY log file on Linux
Tags: Dell, Linux, logrotate, OMSA, SLES, SUSE, TTY
Previously I wrote about How To Install/Uninstall Dell Open Manage Server Administrator(OMSA) On SLES9 or SLES10 and I found another error which is TTY log that keep increasing without automated housekeeping.
As I understand from Dell malling list, there is no way to turn it off. Too bad, I have a TTY log file that almost go up to 1G.
-rw-rw-r-- 1 root root 962M Jun 11 05:45 /var/log/TTY_00000000.log
So, let me explain how to housekeeping OMSA TTY log file using logrotate.
Edit /etc/logrotate.d/omsa-tty and save it as below:
#vi /etc/logrotate.d/omsa-tty
/var/log/TTY_00000000.log {
daily
dateext
notifempty
rotate 7
compress
postrotate
/etc/init.d/dsm_om_shrsvc restart
endscript
}
Personally I don’t think this TTY log file are mission critical to any Linux system.
Basically this file will compress /var/log/TTY_00000000.log file, rotate/restart daily and keep history for 7 days. To make logrotate effective immediately, I would suggest you run:
#logrotate -f /etc/logrotate.d/omsa-tty
Let’s see the example below:
#ls -lth /var/log/TTY*
-rw-rw-r-- 1 root root 962K Jun 11 05:45 /var/log/TTY_00000000.log
-rw-rw-r-- 1 root root 150K Jun 10 23:25 /var/log/TTY_00000000.log-20080610.gz
-rw-rw-r-- 1 root root 150K Jun 09 23:25 /var/log/TTY_00000000.log-20080609.gz
-rw-rw-r-- 1 root root 201K Jun 08 23:25 /var/log/TTY_00000000.log-20080608.gz
I hope this will be helpful for you.
Possibly Related Posts:
- RSS Feed Submissions
- Geo Positions
- Interesting about Google Suggest
- Setup a Linux Highly Availability NFS servers
- How to find empty folders on Linux
