From b6c9d3d7d89683d1b7c4ed46c81cfda34e2f0e3e Mon Sep 17 00:00:00 2001 From: Dru Lavigne Date: Mon, 24 Mar 2014 20:55:36 +0000 Subject: [PATCH] Finish editorial review of logging chapter. Sponsored by: iXsystems --- .../books/handbook/config/chapter.xml | 63 ++++++++++--------- 1 file changed, 33 insertions(+), 30 deletions(-) diff --git a/en_US.ISO8859-1/books/handbook/config/chapter.xml b/en_US.ISO8859-1/books/handbook/config/chapter.xml index 294d6ffc95..9bf9b1168c 100644 --- a/en_US.ISO8859-1/books/handbook/config/chapter.xml +++ b/en_US.ISO8859-1/books/handbook/config/chapter.xml @@ -1345,8 +1345,8 @@ cron.* /var/log/cron - Line 33 is an example usage of a program - specification. This makes the rules + Line 33 is an example usage of a program + specification. This makes the rules following it only valid for the specified program. In this case, only the messages generated by ppp are @@ -1395,24 +1395,24 @@ cron.* /var/log/cron log rotation log management - Log files tend to grow quickly and accumulate steadily. - This leads to the files being full of less immediately useful - information while filling up the hard drive. Log management - attempts to mitigate this. In &os;, &man.newsyslog.8; is used - to manage log files. This program periodically rotates and + Log files can grow quickly, taking up disk space and + making it more difficult to locate useful + information. Log management + attempts to mitigate this. In &os;, newsyslog is used + to manage log files. This built-in program periodically rotates and compresses log files, and optionally creates missing log files and signals programs when log files are moved. The log files - are not necessarily generated by &man.syslogd.8; as - &man.newsyslog.8; works with any logs written from any - program. While &man.newsyslog.8; is normally run from + may be generated by syslogd or + by any other program which generates log files. + While syslogd is normally run from &man.cron.8;, it is not a system daemon. In the default - configuration, it is run every hour. + configuration, it runs every hour. - To know which actions to take, &man.newsyslog.8; reads - its configuration file, by default + To know which actions to take, newsyslog reads + its configuration file, /etc/newsyslog.conf. This - configuration file contains one line for each file that - &man.newsyslog.8; manages. Each line states the file + file contains one line for each log file that + newsyslog manages. Each line states the file owner, permissions, when to rotate that file, optional flags that affect log rotation, such as compression, and programs to signal when the log is rotated. Here is the default @@ -1451,36 +1451,39 @@ cron.* /var/log/cron /var/log/monthly.log 640 12 * $M1D0 JN /var/log/pflog 600 3 100 * JB /var/run/pflogd.pid /var/log/ppp.log root:network 640 3 100 * JC +/var/log/devd.log 644 3 100 * JC /var/log/security 600 10 100 * JC /var/log/sendmail.st 640 10 * 168 B /var/log/utx.log 644 3 * @01T05 B /var/log/weekly.log 640 5 1 $W6D0 JN /var/log/xferlog 600 7 100 * JC - Each line starts with the name of the file to be + Each line starts with the name of the log to be rotated, optionally followed by an owner and group for both rotated and newly created files. The mode field sets the permissions on the log file and count denotes how many rotated log files should be kept. The size and when fields - tell &man.newsyslog.8; when to rotate the file. A log + tell newsyslog when to rotate the file. A log file is rotated when either its size is larger than the - size field, or when the time in the + size field or when the time in the when filed has passed. - * means that this field is ignored. The + An asterisk (*) means that this field is ignored. The flags field gives - &man.newsyslog.8; further instructions, such as how to + further instructions, such as how to compress the rotated file or to create the log file if it - is missing. The last two fields are optional, and - specify the - PID file of a + is missing. The last two fields are optional and + specify the name of the Process ID + (PID) file of a process and a signal number to send to that process when the - file is rotated. For more information on all fields, valid + file is rotated. + + For more information on all fields, valid flags, and how to specify the rotation time, refer to - &man.newsyslog.conf.5;. Since &man.newsyslog.8; is run from + &man.newsyslog.conf.5;. Since newsyslog is run from &man.cron.8;, it can not rotate files more often than it is - run from &man.cron.8;. + scheduled to run from &man.cron.8;. @@ -1503,9 +1506,9 @@ cron.* /var/log/cron increases. Configuring centralized logging can reduce some of the administrative burden of log file administration. - Centralized log file aggregation, merging, and rotation can - be configured using &os; native tools, such as &man.syslogd.8; - and &man.newsyslog.8;. This section demonstrates an example + In &os;, centralized log file aggregation, merging, and rotation can + be configured using syslogd + andnewsyslog. This section demonstrates an example configuration, where host A, named logserv.example.com, will @@ -1722,7 +1725,7 @@ Logging to FILE /var/log/messages encrypted during use or after log rotation. Local users may access log files to gain additional insight into system configuration. Setting proper permissions on log files is - critical. The built-in log rotator, &man.newsyslog.8;, + critical. The built-in log rotator, newsyslog, supports setting permissions on newly created and rotated log files. Setting log files to mode 600 should prevent unwanted access by local users. Refer to