install correct aliases file
[unix-history] / usr / src / usr.sbin / sendmail / doc / syslog.8
CommitLineData
285868f0 1.TH SYSLOG 8
bff69eb1 2.\" @(#)syslog.8 4.2 %G%
285868f0
EA
3.SH NAME
4syslog \- log systems messages
5.SH SYNOPSIS
6/etc/syslog [
7.BI \-m N
8] [
9.BI \-f name
3bfbd4c4
EA
10] [
11.B \-d
285868f0
EA
12]
13.SH DESCRIPTION
14.I Syslog
3bfbd4c4 15reads a datagram socket
285868f0
EA
16and logs each line it reads into a set of files
17described by the configuration file
18/etc/syslog.conf.
19.I Syslog
20configures when it starts up
21and whenever it receives a hangup signal.
22.PP
23Each message is one line.
24A message can contain a priority code,
25marked by a digit in angle braces
26at the beginning of the line.
bff69eb1
EA
27Priorities are defined in
28.RI < syslog.h >,
29as follows:
285868f0
EA
30.IP LOG_ALERT \w'LOG_WARNING'u+2n
31this priority should essentially never
32be used. It applies only to messages that
33are so important that every user should be
34aware of them, e.g., a serious hardware failure.
35.IP LOG_SALERT
36messages of this priority should be
37issued only when immediate attention is needed
38by a qualified system person, e.g., when some
39valuable system resource dissappears. They get
40sent to a list of system people.
41.IP LOG_EMERG
42Emergency messages are not sent to users,
43but represent major conditions. An example
44might be hard disk failures. These could be
45logged in a separate file so that critical
46conditions could be easily scanned.
47.IP LOG_ERR
48these represent error conditions, such as soft
49disk failures, etc.
50.IP LOG_CRIT
51such messages contain critical information,
52but which can not be classed as errors, for example,
bff69eb1 53`su' attempts.
285868f0
EA
54Messages of this priority and higher
55are typically logged on the system console.
56.IP LOG_WARNING
57issued when an abnormal condition has been
58detected, but recovery can take place.
59.IP LOG_NOTICE
60something that falls in the class of
bff69eb1 61``important information''; this class is informational
285868f0
EA
62but important enough that you don't want to throw
63it away casually.
64Messages without any priority assigned to them
65are typically mapped into this priority.
66.IP LOG_INFO
67information level messages. These messages
68could be thrown away without problems, but should
69be included if you want to keep a close watch on
70your system.
71.IP LOG_DEBUG
72it may be useful to log certain debugging
73information. Normally this will be thrown away.
74.PP
75It is expected that the kernel will not log anything below
76LOG_ERR priority.
77.PP
78The configuration file is in two sections
3bfbd4c4 79separated by a blank line.
285868f0
EA
80The first section defines files that
81.I syslog
82will log into.
83Each line contains
84a single digit which defines the lowest priority
85(highest numbered priority)
86that this file will receive,
87an optional asterisk
88which guarantees that something gets output
89at least every 20 minutes,
90and a pathname.
91The second part of the file
92contains a list of users that will be
93informed on SALERT level messages.
94For example, the configuration file:
95.nf
96
bff69eb1 97 5*/dev/console
285868f0
EA
98 8/usr/spool/adm/syslog
99 3/usr/adm/critical
100
101 eric
102 kridle
103 kalash
104
105.fi
106logs all messages of priority 5 or higher
107onto the system console,
108including timing marks every 20 minutes;
109all messages of priority 8 or higher
110into the file /usr/spool/adm/syslog;
111and all messages of priority 3 or higher
112into /usr/adm/critical.
113The users ``eric'', ``kridle'', and ``kalash''
114will be informed on any subalert messages.
115.PP
116The flags are:
bff69eb1
EA
117.TP 0.5i
118.B \-m
285868f0
EA
119Set the mark interval to
120.I N
121(default 20 minutes).
bff69eb1
EA
122.TP
123.B \-f
285868f0 124Specify an alternate configuration file.
bff69eb1
EA
125.TP
126.B \-d
285868f0
EA
127Turn on debugging (if compiled in).
128.PP
129To bring
130.I syslog
131down,
132it should be sent a terminate signal.
133It logs that it is going down
134and then waits approximately 30 seconds
135for any additional messages to come in.
136.PP
137There are some special messages that cause control functions.
138``<*>N'' sets the default message priority to
139.I N.
140``<$>'' causes
141.I syslog
142to reconfigure
143(equivalent to a hangup signal).
144This can be used in a shell file run automatically
145early in the morning to truncate the log.
3bfbd4c4
EA
146.PP
147.I Syslog
148creates the file
149/etc/syslog.pid
150if possible
151containing a single line
152with its process id.
153This can be used to kill or reconfigure
154.I syslog.
bff69eb1
EA
155.\".PP
156.\".I Syslog
157.\"can also be compiled to use
158.\".IR mpx (2)
159.\"files instead of datagrams
160.\"if you are running V7.
161.\"In this case it creates and reads the file
162.\"/dev/log.
285868f0
EA
163.SH FILES
164/etc/syslog.conf \- the configuration file
3bfbd4c4
EA
165.br
166/etc/syslog.pid \- the process id
bff69eb1
EA
167.\".br
168.\"/dev/log \- under V7, the mpx file
285868f0
EA
169.SH BUGS
170LOG_ALERT and LOG_SUBALERT messages
171should only be allowed to privileged programs.
172.PP
173Actually,
174.I syslog
3bfbd4c4
EA
175is not clever enough to deal with kernel error messages
176in the current implementation.
285868f0
EA
177.SH SEE\ ALSO
178syslog(3)