Automating Log Maintenance

All Unix systems have an abundance of log files. There are log files for the kernel, for sendmail, for Web servers, and most other Unix applications in existence today. The problem with log files is that they can grow to enormous sizes if not trimmed or rotated regularly; searching through a 2GB log file for a single piece of data can take quite a bit of time, especially if you are not sure of the exact log you are looking for. They can also fill your file system or drive, which is even more catastrophic.

Many utilities exist for rotating logs; some are provided with the operating system, and some are available from third parties. Almost all modern Unix vendors, Solaris and Red Hat Linux included, at the very least ...

Get Unix® System Management Primer Plus now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.