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