minor cleanups, clarify -f flag
[unix-history] / usr / src / usr.sbin / syslogd / syslogd.8
CommitLineData
e7011020 1.\" Copyright (c) 1983,1986 Regents of the University of California.
60af2e6d
KM
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
e7011020 5.\" @(#)syslogd.8 6.5 (Berkeley) %G%
be78fd26 6.TH SYSLOGD 8 ""
60af2e6d
KM
7.UC 5
8.SH NAME
84cb5481 9syslogd \- log systems messages
60af2e6d 10.SH SYNOPSIS
84cb5481
KM
11.B /etc/syslogd
12[
be78fd26 13.BI \-f configfile
60af2e6d 14] [
3bd3334e
EA
15.BI \-m markinterval
16] [
60af2e6d
KM
17.B \-d
18]
19.SH DESCRIPTION
84cb5481 20.I Syslogd
be78fd26 21reads and logs messages into a set of files
60af2e6d
KM
22described by the configuration file
23/etc/syslog.conf.
60af2e6d
KM
24Each message is one line.
25A message can contain a priority code,
84cb5481 26marked by a number in angle braces
60af2e6d
KM
27at the beginning of the line.
28Priorities are defined in
e7011020 29.RI < sys/syslog.h >.
be78fd26
EA
30.I Syslogd
31reads from the UNIX domain socket
32.IR /dev/log ,
33from an Internet domain socket specified in
34.IR /etc/services ,
35and from the special device
36.I /dev/klog
37(to read kernel messages).
60af2e6d 38.PP
84cb5481
KM
39.I Syslogd
40configures when it starts up
41and whenever it receives a hangup signal.
be78fd26
EA
42Lines in the configuration file have a
43.I selector
44to determine the message priorities to which the line applies
45and an
46.IR action .
e7011020
MK
47The
48.I action
49field are separated from the selector by one or more tabs.
be78fd26
EA
50.PP
51Selectors are semicolon separated lists of priority specifiers.
52Each priority has a
53.I facility
54describing the part of the system that generated the message,
55a dot,
56and a
57.I level
58indicating the severity of the message.
59Symbolic names may be used.
60An asterisk selects all facilities.
e7011020 61All messages of the specified level or higher (greater severity)
be78fd26
EA
62are selected.
63More than one facility may be selected using commas to separate them.
64For example:
65.PP
66.ti +5
67*.emerg;mail,daemon.crit
68.PP
69Selects all facilities at the
70.I emerg
71level and the
72.I mail
73and
74.I daemon
75facilities at the
76.I crit
77level.
3bd3334e
EA
78.PP
79Known facilities and levels
80recognized by
81.I syslogd
82are those listed in
83.IR syslog (3)
84without the leading ``LOG_''.
85The additional facility
e7011020 86``mark'' has a message at priority LOG_INFO sent to it every
3bd3334e
EA
8720 minutes
88(this may be changed with the
89.B \-m
90flag).
e7011020 91The ``mark'' facility is not enabled by a facility field containing an asterisk.
3bd3334e
EA
92The level ``none'' may be used to disable a particular facility.
93For example,
94.PP
95.ti +5
e7011020 96*.debug;mail.none
3bd3334e
EA
97.PP
98Sends all messages
99.I except
e7011020 100mail messages to the selected file.
be78fd26
EA
101.PP
102The second part of each line describes where the message is to be logged
103if this line is selected.
104There are four forms:
105.IP \(bu 3n
106A filename (beginning with a leading slash).
107The file will be opened in append mode.
108.IP \(bu 3n
109A hostname preceeded by an at sign (``@'').
110Selected messages are forwarded to the
84cb5481 111.I syslogd
be78fd26
EA
112on the named host.
113.IP \(bu 3n
114A comma separated list of users.
115Selected messages are written to those users
116if they are logged in.
117.IP \(bu 3n
118An asterisk.
119Selected messages are written to all logged-in users.
84cb5481 120.PP
3bd3334e
EA
121Blank lines and lines beginning with `#' are ignored.
122.PP
60af2e6d 123For example, the configuration file:
3bd3334e 124.PP
60af2e6d 125.nf
be78fd26 126.ta 4m +\w'*.alert,auth.warning'u+3
3bd3334e
EA
127 kern,mark.debug /dev/console
128 *.notice;mail.info /usr/spool/adm/syslog
be78fd26
EA
129 *.crit /usr/adm/critical
130 kern.err @ucbarpa
131 *.emerg *
132 *.alert eric,kridle
3bd3334e 133 *.alert;auth.warning ralph
60af2e6d 134.fi
3bd3334e
EA
135.PP
136logs all kernel messages
137and 20 minute marks onto the system console,
be78fd26
EA
138all notice (or higher) level messages and all mail system messages
139except debug messages
140into the file /usr/spool/adm/syslog,
141and all critical messages
142into /usr/adm/critical;
143kernel messages of error severity or higher are forwarded
144to ucbarpa.
145All users will be informed of any emergency messages,
146the users ``eric'' and ``kridle''
147will be informed of any alert messages,
148and the user ``ralph''
149will be informed of any alert message,
150or any warning message (or higher)
151from the authorization system.
60af2e6d
KM
152.PP
153The flags are:
154.TP 0.5i
60af2e6d
KM
155.B \-f
156Specify an alternate configuration file.
157.TP
40967c0b
EA
158.B \-m
159Select the number of minutes between mark messages.
160.TP
60af2e6d 161.B \-d
be78fd26 162Turn on debugging.
60af2e6d 163.PP
84cb5481
KM
164.I Syslogd
165creates the file /etc/syslog.pid, if possible,
166containing a single line with its process id.
167This can be used to kill or reconfigure
168.I syslogd.
169.PP
60af2e6d 170To bring
84cb5481 171.I syslogd
60af2e6d 172down,
be78fd26 173it should be sent a terminate signal (e.g. kill \`cat /etc/syslog.pid\`).
60af2e6d 174.SH FILES
84cb5481
KM
175.ta \w'/etc/syslog.conf 'u
176.nf
177/etc/syslog.conf the configuration file
178/etc/syslog.pid the process id
be78fd26
EA
179/dev/log Name of the UNIX domain datagram log socket
180/dev/klog The kernel log device
84cb5481 181.fi
be78fd26
EA
182.SH SEE ALSO
183logger(1),
60af2e6d 184syslog(3)