install correct aliases file
[unix-history] / usr / src / usr.sbin / syslogd / syslogd.8
... / ...
CommitLineData
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%
17.\"
18.TH SYSLOGD 8 ""
19.UC 5
20.SH NAME
21syslogd \- log systems messages
22.SH SYNOPSIS
23.B /etc/syslogd
24[
25.BI \-f configfile
26] [
27.BI \-m markinterval
28] [
29.B \-d
30]
31.SH DESCRIPTION
32.I Syslogd
33reads and logs messages into a set of files
34described by the configuration file
35/etc/syslog.conf.
36Each message is one line.
37A message can contain a priority code,
38marked by a number in angle braces
39at the beginning of the line.
40Priorities are defined in
41.RI < sys/syslog.h >.
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).
50.PP
51.I Syslogd
52configures when it starts up
53and whenever it receives a hangup signal.
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 .
59The
60.I action
61field are separated from the selector by one or more tabs.
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.
73All messages of the specified level or higher (greater severity)
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.
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
98``mark'' has a message at priority LOG_INFO sent to it every
9920 minutes
100(this may be changed with the
101.B \-m
102flag).
103The ``mark'' facility is not enabled by a facility field containing an asterisk.
104The level ``none'' may be used to disable a particular facility.
105For example,
106.PP
107.ti +5
108*.debug;mail.none
109.PP
110Sends all messages
111.I except
112mail messages to the selected file.
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
123.I syslogd
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.
132.PP
133Blank lines and lines beginning with `#' are ignored.
134.PP
135For example, the configuration file:
136.PP
137.nf
138.ta 4m +\w'*.alert,auth.warning'u+3
139 kern,mark.debug /dev/console
140 *.notice;mail.info /usr/spool/adm/syslog
141 *.crit /usr/adm/critical
142 kern.err @ucbarpa
143 *.emerg *
144 *.alert eric,kridle
145 *.alert;auth.warning ralph
146.fi
147.PP
148logs all kernel messages
149and 20 minute marks onto the system console,
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.
164.PP
165The flags are:
166.TP 0.5i
167.B \-f
168Specify an alternate configuration file.
169.TP
170.B \-m
171Select the number of minutes between mark messages.
172.TP
173.B \-d
174Turn on debugging.
175.PP
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
182To bring
183.I syslogd
184down,
185it should be sent a terminate signal (e.g. kill \`cat /etc/syslog.pid\`).
186.SH FILES
187.ta \w'/etc/syslog.conf 'u
188.nf
189/etc/syslog.conf the configuration file
190/etc/syslog.pid the process id
191/dev/log Name of the UNIX domain datagram log socket
192/dev/klog The kernel log device
193.fi
194.SH SEE ALSO
195logger(1), syslog(3)