Commit | Line | Data |
---|---|---|
e7011020 | 1 | .\" Copyright (c) 1983,1986 Regents of the University of California. |
60af2e6d KM |
2 | .\" All rights reserved. The Berkeley software License Agreement |
3 | .\" specifies the terms and conditions for redistribution. | |
4 | .\" | |
e7011020 | 5 | .\" @(#)syslogd.8 6.5 (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 | |
e7011020 | 29 | .RI < sys/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 . | |
e7011020 MK |
47 | The |
48 | .I action | |
49 | field are separated from the selector by one or more tabs. | |
be78fd26 EA |
50 | .PP |
51 | Selectors are semicolon separated lists of priority specifiers. | |
52 | Each priority has a | |
53 | .I facility | |
54 | describing the part of the system that generated the message, | |
55 | a dot, | |
56 | and a | |
57 | .I level | |
58 | indicating the severity of the message. | |
59 | Symbolic names may be used. | |
60 | An asterisk selects all facilities. | |
e7011020 | 61 | All messages of the specified level or higher (greater severity) |
be78fd26 EA |
62 | are selected. |
63 | More than one facility may be selected using commas to separate them. | |
64 | For example: | |
65 | .PP | |
66 | .ti +5 | |
67 | *.emerg;mail,daemon.crit | |
68 | .PP | |
69 | Selects all facilities at the | |
70 | .I emerg | |
71 | level and the | |
72 | .I mail | |
73 | and | |
74 | .I daemon | |
75 | facilities at the | |
76 | .I crit | |
77 | level. | |
3bd3334e EA |
78 | .PP |
79 | Known facilities and levels | |
80 | recognized by | |
81 | .I syslogd | |
82 | are those listed in | |
83 | .IR syslog (3) | |
84 | without the leading ``LOG_''. | |
85 | The additional facility | |
e7011020 | 86 | ``mark'' has a message at priority LOG_INFO sent to it every |
3bd3334e EA |
87 | 20 minutes |
88 | (this may be changed with the | |
89 | .B \-m | |
90 | flag). | |
e7011020 | 91 | The ``mark'' facility is not enabled by a facility field containing an asterisk. |
3bd3334e EA |
92 | The level ``none'' may be used to disable a particular facility. |
93 | For example, | |
94 | .PP | |
95 | .ti +5 | |
e7011020 | 96 | *.debug;mail.none |
3bd3334e EA |
97 | .PP |
98 | Sends all messages | |
99 | .I except | |
e7011020 | 100 | mail messages to the selected file. |
be78fd26 EA |
101 | .PP |
102 | The second part of each line describes where the message is to be logged | |
103 | if this line is selected. | |
104 | There are four forms: | |
105 | .IP \(bu 3n | |
106 | A filename (beginning with a leading slash). | |
107 | The file will be opened in append mode. | |
108 | .IP \(bu 3n | |
109 | A hostname preceeded by an at sign (``@''). | |
110 | Selected messages are forwarded to the | |
84cb5481 | 111 | .I syslogd |
be78fd26 EA |
112 | on the named host. |
113 | .IP \(bu 3n | |
114 | A comma separated list of users. | |
115 | Selected messages are written to those users | |
116 | if they are logged in. | |
117 | .IP \(bu 3n | |
118 | An asterisk. | |
119 | Selected messages are written to all logged-in users. | |
84cb5481 | 120 | .PP |
3bd3334e EA |
121 | Blank lines and lines beginning with `#' are ignored. |
122 | .PP | |
60af2e6d | 123 | For example, the configuration file: |
3bd3334e | 124 | .PP |
60af2e6d | 125 | .nf |
be78fd26 | 126 | .ta 4m +\w'*.alert,auth.warning'u+3 |
3bd3334e EA |
127 | kern,mark.debug /dev/console |
128 | *.notice;mail.info /usr/spool/adm/syslog | |
be78fd26 EA |
129 | *.crit /usr/adm/critical |
130 | kern.err @ucbarpa | |
131 | *.emerg * | |
132 | *.alert eric,kridle | |
3bd3334e | 133 | *.alert;auth.warning ralph |
60af2e6d | 134 | .fi |
3bd3334e EA |
135 | .PP |
136 | logs all kernel messages | |
137 | and 20 minute marks onto the system console, | |
be78fd26 EA |
138 | all notice (or higher) level messages and all mail system messages |
139 | except debug messages | |
140 | into the file /usr/spool/adm/syslog, | |
141 | and all critical messages | |
142 | into /usr/adm/critical; | |
143 | kernel messages of error severity or higher are forwarded | |
144 | to ucbarpa. | |
145 | All users will be informed of any emergency messages, | |
146 | the users ``eric'' and ``kridle'' | |
147 | will be informed of any alert messages, | |
148 | and the user ``ralph'' | |
149 | will be informed of any alert message, | |
150 | or any warning message (or higher) | |
151 | from the authorization system. | |
60af2e6d KM |
152 | .PP |
153 | The flags are: | |
154 | .TP 0.5i | |
60af2e6d KM |
155 | .B \-f |
156 | Specify an alternate configuration file. | |
157 | .TP | |
40967c0b EA |
158 | .B \-m |
159 | Select the number of minutes between mark messages. | |
160 | .TP | |
60af2e6d | 161 | .B \-d |
be78fd26 | 162 | Turn on debugging. |
60af2e6d | 163 | .PP |
84cb5481 KM |
164 | .I Syslogd |
165 | creates the file /etc/syslog.pid, if possible, | |
166 | containing a single line with its process id. | |
167 | This can be used to kill or reconfigure | |
168 | .I syslogd. | |
169 | .PP | |
60af2e6d | 170 | To bring |
84cb5481 | 171 | .I syslogd |
60af2e6d | 172 | down, |
be78fd26 | 173 | it should be sent a terminate signal (e.g. kill \`cat /etc/syslog.pid\`). |
60af2e6d | 174 | .SH FILES |
84cb5481 KM |
175 | .ta \w'/etc/syslog.conf 'u |
176 | .nf | |
177 | /etc/syslog.conf the configuration file | |
178 | /etc/syslog.pid the process id | |
be78fd26 EA |
179 | /dev/log Name of the UNIX domain datagram log socket |
180 | /dev/klog The kernel log device | |
84cb5481 | 181 | .fi |
be78fd26 EA |
182 | .SH SEE ALSO |
183 | logger(1), | |
60af2e6d | 184 | syslog(3) |