Tuesday, July 13, 2010
logadm: Log Administration
logadm ends up giving us a huge amount of control over our log files, without having to write and maintain shell scripts.
Every solaris build environment has already a root crontab entry for logadm utility and it reads off a configuration file in /etc/logadm.conf
The configuration file already monitors and maintains existing /var/adm system administration log files eg, syslog, messages log , etc
Running the following command we want to keep 1 copy of the log and we want to cycle when it reaches 1gb , copy and truncate them (without restarting any service), compress a copy of the log file and write an entry into the /etc/logadm.conf
logadm -C 1 -s 1g -c -z 0 -w /usr/local/apache2.2/logs/error_log
Labels:
Logs
No comments:
Post a Comment