install with -s
[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.\"
84cb5481 5.\" @(#)syslogd.8 6.1 (Berkeley) %G%
60af2e6d
KM
6.\"
7.\" @(#)syslog.8 4.2 7/28/83
84cb5481 8.TH SYSLOG 8 ""
60af2e6d
KM
9.UC 5
10.SH NAME
84cb5481 11syslogd \- log systems messages
60af2e6d 12.SH SYNOPSIS
84cb5481
KM
13.B /etc/syslogd
14[
60af2e6d
KM
15.BI \-m N
16] [
17.BI \-f name
18] [
19.B \-d
20]
21.SH DESCRIPTION
84cb5481 22.I Syslogd
60af2e6d
KM
23reads a datagram socket
24and logs each line it reads into a set of files
25described by the configuration file
26/etc/syslog.conf.
60af2e6d
KM
27Each message is one line.
28A message can contain a priority code,
84cb5481 29marked by a number in angle braces
60af2e6d
KM
30at the beginning of the line.
31Priorities are defined in
84cb5481 32.RI < syslog.h >.
60af2e6d 33.PP
84cb5481
KM
34.I Syslogd
35configures when it starts up
36and whenever it receives a hangup signal.
60af2e6d
KM
37The configuration file is in two sections
38separated by a blank line.
39The first section defines files that
84cb5481
KM
40.I syslogd
41will log into or host names that
42.I syslogd
43will forward messages to.
60af2e6d 44Each line contains
84cb5481
KM
45a set of numbers which define the message priorities
46that this file or host will receive;
60af2e6d
KM
47an optional asterisk
48which guarantees that something gets output
84cb5481
KM
49at least every 15 minutes;
50and a pathname or a hostname prefixed by `@'.
60af2e6d 51The second part of the file
84cb5481
KM
52contains a list of users who will receive messages if logged in.
53Each line contains an optional
54set of numbers which define the message priorities
55that this user will receive followed by the user's login name.
56The default priority level is LOG_SALERT if none is specified.
57Priority numbers may range from 1 to 31,
58and may be given in comma-separated lists
59and/or dash-separated ranges.
60.PP
60af2e6d
KM
61For example, the configuration file:
62.nf
63
84cb5481
KM
64 1-5*/dev/console
65 8-9,25/usr/spool/adm/syslog
66 1-3/usr/adm/critical
67 1-4@ucbarpa
60af2e6d
KM
68
69 eric
70 kridle
84cb5481 71 1-5,25ralph
60af2e6d
KM
72
73.fi
84cb5481 74logs all messages of priorities 1 through 5
60af2e6d 75onto the system console,
84cb5481
KM
76including timing marks every 15 minutes;
77all messages of priorities 8, 9 or 25
60af2e6d 78into the file /usr/spool/adm/syslog;
84cb5481
KM
79all messages of priorities 3 or higher
80into /usr/adm/critical and
81forwards all messages of priorities 4 or higher to ucbarpa.
82The users ``eric'' and ``kridle''
60af2e6d 83will be informed on any subalert messages.
84cb5481
KM
84The user ``ralph''
85will be informed on any message of priorities 5 or higher,
86and any message of priority 25.
60af2e6d
KM
87.PP
88The flags are:
89.TP 0.5i
90.B \-m
91Set the mark interval to
92.I N
84cb5481 93(default 15 minutes).
60af2e6d
KM
94.TP
95.B \-f
96Specify an alternate configuration file.
97.TP
98.B \-d
99Turn on debugging (if compiled in).
100.PP
84cb5481
KM
101.I Syslogd
102creates the file /etc/syslog.pid, if possible,
103containing a single line with its process id.
104This can be used to kill or reconfigure
105.I syslogd.
106.PP
60af2e6d 107To bring
84cb5481 108.I syslogd
60af2e6d 109down,
84cb5481 110it should be sent a terminate signal (e.g. kill `cat /etc/syslog.pid`).
60af2e6d 111.SH FILES
84cb5481
KM
112.ta \w'/etc/syslog.conf 'u
113.nf
114/etc/syslog.conf the configuration file
115/etc/syslog.pid the process id
116/dev/log UNIX domain datagram socket to listen to
117.fi
60af2e6d 118.SH BUGS
84cb5481
KM
119Kernel priorities should only be allowed to privileged programs.
120.SH "SEE ALSO"
60af2e6d 121syslog(3)