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