Apple Mac OS X Server Guia de Configuração Página 31: Local Logging

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

3.10.2 Local Logging

The default configuration in
/etc/syslog.conf
is appropriate for a Mac OS X
Server system if 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
1).
Table 1: 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:
25
UNCLASSIFIED

Ficheiro PDF · ·

Imprimir

Imprimir documento

Partilha

Perguntas sobre Apple Mac OS X Server

Ainda não há perguntas sobre este manual. Faça a primeira.

Fazer uma pergunta

Respondemos a partir do manual e indicamos a página. A pergunta é publicada no site depois de verificada.

Todas as perguntas e respostas ›

Manuais e produtos relacionados com Software Apple Mac OS X Server