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