The System Log Rotation Service (SLRS) is a tool that automates rotation of collected Unix system log files. The tool is both flexible and customizable. By automatically managing system log files you prevent these logs from filling up their respective data partitions and you facilitate the organization and management of this valuable systems administration information resource. An additional benefit is that all included systems and their managed log files are now found in one place. This can be a big help when troubleshooting obscure system or network problems.
SLRS has been written using Bourne shell commands over the past 10 years by the author. It functions in an autonomous manner to maintain generic operating system and application generated log files. The distribution includes the rotation script, several daemon notification scripts and an input file containing a list of common Solaris system log files. SLRS was originally developed to complement the SLAPS-2 System Log Analysis and Profiling System.
SLRS is based on the premise that, in general, the rotation of a log file should be triggered when the size of the monitored log file matches or exceeds a definable threshold. When the rotation service executes on a daily basis, requirements mandating a periodic rotation can be easily met. The utility also provides the following capabilities on a per log file basis:
- A unique definable size threshold.
- If enabled, automatic compression of the rotated log file.
- Self-purging of the rotated log file when the age of the rotated file exceeds a definable limit.
- Daemon tickling/ notification when the log file is rotated.
- An ability to bypass the rotation on defined hosts.
- Definable protections on the rotated log files.
- Definable destinations for the rotated log files.
The list of monitored log files is controlled via a single text input file that is read by the rotation service script. Changes to the list of monitored log files are accomplished by editing this input file.