Views:
If detailed debugging has to run for a number of days or weeks, use logrotate to rotate and compress log files automatically. Refer to the logrotate man page for details on logrotate.

Procedure

  1. Use a text editor such as vi, open /etc/logrotate.d/syslog.
    WARNING
    WARNING
    Making incorrect changes to a configuration file can cause serious system errors. Before you start, back up tmsplx.xml in case you need to restore your original settings.
  2. Add the following lines to rotate logs:
    /var/log/messages /{path}/{splxlog} {
       sharedscripts
       postrotate
       /bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 
       2> /dev/null || true
       endscript
    }
  3. Save and close the syslog file.