January 2004
Intermediate to advanced
368 pages
7h 25m
English
Users who don't have much experience with Unix can be quite surprised by how many commands, utilities, and daemons log events to system log files. Even on a computer with lots of disk space, it's important to keep an eye on the size of these files and, of course, on their contents too.
As a result, most sysadmins have a set of instructions that they place at the top of their log file analysis utilities, similar to the following:
mv $log.2 $log.3 mv $log.1 $log.2 mv $log $log.1 touch $log
If run weekly, this would produce a rolling one-month archive of log file information divided into week-size portions of data. However, it's just as easy to create a script that accomplishes this for all log files in the /var/log directory ...
Read now
Unlock full access