consistency, use SIGTERM once then SIGKILL's, uniform logging (once)
[unix-history] / usr / src / usr.sbin / syslogd / syslogd.8
CommitLineData
60af2e6d
KM
1.\" Copyright (c) 1983 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
40967c0b 5.\" @(#)syslogd.8 6.4 (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
84cb5481 29.RI < 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 .
47.PP
48Selectors are semicolon separated lists of priority specifiers.
49Each priority has a
50.I facility
51describing the part of the system that generated the message,
52a dot,
53and a
54.I level
55indicating the severity of the message.
56Symbolic names may be used.
57An asterisk selects all facilities.
58All messages of the specified level or higher
59are selected.
60More than one facility may be selected using commas to separate them.
61For example:
62.PP
63.ti +5
64*.emerg;mail,daemon.crit
65.PP
66Selects all facilities at the
67.I emerg
68level and the
69.I mail
70and
71.I daemon
72facilities at the
73.I crit
74level.
3bd3334e
EA
75.PP
76Known facilities and levels
77recognized by
78.I syslogd
79are those listed in
80.IR syslog (3)
81without the leading ``LOG_''.
82The additional facility
83``mark'' has a message sent to it every
8420 minutes
85(this may be changed with the
86.B \-m
87flag).
88The level ``none'' may be used to disable a particular facility.
89For example,
90.PP
91.ti +5
92*.debug;mark.none
93.PP
94Sends all messages
95.I except
96mark messages to the selected file.
be78fd26
EA
97.PP
98The second part of each line describes where the message is to be logged
99if this line is selected.
100There are four forms:
101.IP \(bu 3n
102A filename (beginning with a leading slash).
103The file will be opened in append mode.
104.IP \(bu 3n
105A hostname preceeded by an at sign (``@'').
106Selected messages are forwarded to the
84cb5481 107.I syslogd
be78fd26
EA
108on the named host.
109.IP \(bu 3n
110A comma separated list of users.
111Selected messages are written to those users
112if they are logged in.
113.IP \(bu 3n
114An asterisk.
115Selected messages are written to all logged-in users.
84cb5481 116.PP
3bd3334e
EA
117Blank lines and lines beginning with `#' are ignored.
118.PP
60af2e6d 119For example, the configuration file:
3bd3334e 120.PP
60af2e6d 121.nf
be78fd26 122.ta 4m +\w'*.alert,auth.warning'u+3
3bd3334e
EA
123 kern,mark.debug /dev/console
124 *.notice;mail.info /usr/spool/adm/syslog
be78fd26
EA
125 *.crit /usr/adm/critical
126 kern.err @ucbarpa
127 *.emerg *
128 *.alert eric,kridle
3bd3334e 129 *.alert;auth.warning ralph
60af2e6d 130.fi
3bd3334e
EA
131.PP
132logs all kernel messages
133and 20 minute marks onto the system console,
be78fd26
EA
134all notice (or higher) level messages and all mail system messages
135except debug messages
136into the file /usr/spool/adm/syslog,
137and all critical messages
138into /usr/adm/critical;
139kernel messages of error severity or higher are forwarded
140to ucbarpa.
141All users will be informed of any emergency messages,
142the users ``eric'' and ``kridle''
143will be informed of any alert messages,
144and the user ``ralph''
145will be informed of any alert message,
146or any warning message (or higher)
147from the authorization system.
60af2e6d
KM
148.PP
149The flags are:
150.TP 0.5i
60af2e6d
KM
151.B \-f
152Specify an alternate configuration file.
153.TP
40967c0b
EA
154.B \-m
155Select the number of minutes between mark messages.
156.TP
60af2e6d 157.B \-d
be78fd26 158Turn on debugging.
60af2e6d 159.PP
84cb5481
KM
160.I Syslogd
161creates the file /etc/syslog.pid, if possible,
162containing a single line with its process id.
163This can be used to kill or reconfigure
164.I syslogd.
165.PP
60af2e6d 166To bring
84cb5481 167.I syslogd
60af2e6d 168down,
be78fd26 169it should be sent a terminate signal (e.g. kill \`cat /etc/syslog.pid\`).
60af2e6d 170.SH FILES
84cb5481
KM
171.ta \w'/etc/syslog.conf 'u
172.nf
173/etc/syslog.conf the configuration file
174/etc/syslog.pid the process id
be78fd26
EA
175/dev/log Name of the UNIX domain datagram log socket
176/dev/klog The kernel log device
84cb5481 177.fi
be78fd26
EA
178.SH SEE ALSO
179logger(1),
60af2e6d 180syslog(3)