Commit | Line | Data |
---|---|---|
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 | 9 | syslogd \- 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 | 21 | reads and logs messages into a set of files |
60af2e6d KM |
22 | described by the configuration file |
23 | /etc/syslog.conf. | |
60af2e6d KM |
24 | Each message is one line. |
25 | A message can contain a priority code, | |
84cb5481 | 26 | marked by a number in angle braces |
60af2e6d KM |
27 | at the beginning of the line. |
28 | Priorities are defined in | |
84cb5481 | 29 | .RI < syslog.h >. |
be78fd26 EA |
30 | .I Syslogd |
31 | reads from the UNIX domain socket | |
32 | .IR /dev/log , | |
33 | from an Internet domain socket specified in | |
34 | .IR /etc/services , | |
35 | and from the special device | |
36 | .I /dev/klog | |
37 | (to read kernel messages). | |
60af2e6d | 38 | .PP |
84cb5481 KM |
39 | .I Syslogd |
40 | configures when it starts up | |
41 | and whenever it receives a hangup signal. | |
be78fd26 EA |
42 | Lines in the configuration file have a |
43 | .I selector | |
44 | to determine the message priorities to which the line applies | |
45 | and an | |
46 | .IR action . | |
47 | .PP | |
48 | Selectors are semicolon separated lists of priority specifiers. | |
49 | Each priority has a | |
50 | .I facility | |
51 | describing the part of the system that generated the message, | |
52 | a dot, | |
53 | and a | |
54 | .I level | |
55 | indicating the severity of the message. | |
56 | Symbolic names may be used. | |
57 | An asterisk selects all facilities. | |
58 | All messages of the specified level or higher | |
59 | are selected. | |
60 | More than one facility may be selected using commas to separate them. | |
61 | For example: | |
62 | .PP | |
63 | .ti +5 | |
64 | *.emerg;mail,daemon.crit | |
65 | .PP | |
66 | Selects all facilities at the | |
67 | .I emerg | |
68 | level and the | |
69 | .I mail | |
70 | and | |
71 | .I daemon | |
72 | facilities at the | |
73 | .I crit | |
74 | level. | |
3bd3334e EA |
75 | .PP |
76 | Known facilities and levels | |
77 | recognized by | |
78 | .I syslogd | |
79 | are those listed in | |
80 | .IR syslog (3) | |
81 | without the leading ``LOG_''. | |
82 | The additional facility | |
83 | ``mark'' has a message sent to it every | |
84 | 20 minutes | |
85 | (this may be changed with the | |
86 | .B \-m | |
87 | flag). | |
88 | The level ``none'' may be used to disable a particular facility. | |
89 | For example, | |
90 | .PP | |
91 | .ti +5 | |
92 | *.debug;mark.none | |
93 | .PP | |
94 | Sends all messages | |
95 | .I except | |
96 | mark messages to the selected file. | |
be78fd26 EA |
97 | .PP |
98 | The second part of each line describes where the message is to be logged | |
99 | if this line is selected. | |
100 | There are four forms: | |
101 | .IP \(bu 3n | |
102 | A filename (beginning with a leading slash). | |
103 | The file will be opened in append mode. | |
104 | .IP \(bu 3n | |
105 | A hostname preceeded by an at sign (``@''). | |
106 | Selected messages are forwarded to the | |
84cb5481 | 107 | .I syslogd |
be78fd26 EA |
108 | on the named host. |
109 | .IP \(bu 3n | |
110 | A comma separated list of users. | |
111 | Selected messages are written to those users | |
112 | if they are logged in. | |
113 | .IP \(bu 3n | |
114 | An asterisk. | |
115 | Selected messages are written to all logged-in users. | |
84cb5481 | 116 | .PP |
3bd3334e EA |
117 | Blank lines and lines beginning with `#' are ignored. |
118 | .PP | |
60af2e6d | 119 | For 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 |
132 | logs all kernel messages | |
133 | and 20 minute marks onto the system console, | |
be78fd26 EA |
134 | all notice (or higher) level messages and all mail system messages |
135 | except debug messages | |
136 | into the file /usr/spool/adm/syslog, | |
137 | and all critical messages | |
138 | into /usr/adm/critical; | |
139 | kernel messages of error severity or higher are forwarded | |
140 | to ucbarpa. | |
141 | All users will be informed of any emergency messages, | |
142 | the users ``eric'' and ``kridle'' | |
143 | will be informed of any alert messages, | |
144 | and the user ``ralph'' | |
145 | will be informed of any alert message, | |
146 | or any warning message (or higher) | |
147 | from the authorization system. | |
60af2e6d KM |
148 | .PP |
149 | The flags are: | |
150 | .TP 0.5i | |
60af2e6d KM |
151 | .B \-f |
152 | Specify an alternate configuration file. | |
153 | .TP | |
40967c0b EA |
154 | .B \-m |
155 | Select the number of minutes between mark messages. | |
156 | .TP | |
60af2e6d | 157 | .B \-d |
be78fd26 | 158 | Turn on debugging. |
60af2e6d | 159 | .PP |
84cb5481 KM |
160 | .I Syslogd |
161 | creates the file /etc/syslog.pid, if possible, | |
162 | containing a single line with its process id. | |
163 | This can be used to kill or reconfigure | |
164 | .I syslogd. | |
165 | .PP | |
60af2e6d | 166 | To bring |
84cb5481 | 167 | .I syslogd |
60af2e6d | 168 | down, |
be78fd26 | 169 | it 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 |
179 | logger(1), | |
60af2e6d | 180 | syslog(3) |