Setup guide

UNCLASSIFIED
UNCLASSIFIED
55
Chapter 4-
Configuring System Settings
mail.emerg /var/log/mail.log
The facility and priority are separated by only a period, and these are separated from
the action by one or more tabs. Wildcards (β€œ*”) may also be used in the
configuration file. The following example line logs all messages of any facility or
priority to the file /var/log/all.log:
*.* /var/log/all.log
Local Logging
The default configuration in /etc/syslog.conf is already appropriate for the
typical Mac OS X system when a remote log server is not available. The system is set
to rotate log files using a cron job at the time intervals specified in the file
/etc/crontab. Rotation entails compressing the current log file, incrementing the
integer in the filename of compressed log files, and creating a new log file for new
messages (Table 2).
Table 2: Log Files in /var/log
Files before rotation: Files after first rotation: Files after second rotation:
System.log system.log system.log
mail.log mail.log mail.log
mail.log.1.gz mail.log.1.gz
system.log.1.gz system.log.1.gz
mail.log.2.gz
system.log.2.gz
The log files are rotated by a cron job, and the rotation will only occur if the system is
on when the job is scheduled. By default, the log rotation tasks are scheduled for
very early in the morning (e.g. 4:30 A.M. on Saturday) in order to be as unobtrusive
as possible. If the system will not be powered on at this time, adjust the settings in
/etc/crontab.
Details on editing the /etc/crontab file can be found by issuing the command
man 5 crontab in a terminal window. For example, the following line shows the
default for running the weekly log rotation script, which is configured for 4:15 AM
on the last day of the week, Saturday (Sunday is 0). An asterisk denotes β€œany,” so a
line of all asterisks would execute every minute.
DayOf DayOf
#Minute Hour Month Month Week User Command
15 4 * * 6 root periodic weekly
The following line would change the time to 12:15 PM on Tuesday, when the system
is much more likely to be on: