|Front | Info | Lists | Newsfeeds | Study Guide | What is BSD?|
This is the BSDA Study Guide Book written via a wiki collaboration. This is a work in progress. You may contribute to or discuss this specific page at http://bsdwiki.reedmedia.net/wiki/Configure_log_rotations.html.
Configure log rotations
Understand that the system automatically maintains many different logs. Be able to configure log rotation by either time or size.
TODO: explain "rotated" or "rotation"
Note that the newsyslog(8) implementations vary by BSD.
The newsyslog configuration is at
TODO: explain the above. Count is the number of generations. TODO: show examples of results (short directory listing)
The following newsyslog example rotates a log file under a home directory. It rotates the file whenever it gets to at least 500 Kilobytes and keeps the most recent 52 compressed archives. newsyslog creates a new log file owned by root (and doesn't add any log entry to it), and then sends a USR1 signal to the process found in the listed PID file.
newsyslog(8), newsyslog.conf(5), syslog.conf(5)