Print this page
4211 Some syslog facility names and symbols are missing
3232 syslogd shouldn't sync after each LOG_KERN line
1762 Syslogd man page: missing reference.
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man1m/syslogd.1m
+++ new/usr/src/man/man1m/syslogd.1m
1 1 '\" te
2 +.\" Copyright (c) 2013 Gary Mills
2 3 .\" Copyright (C) 2008, Sun Microsystems, Inc. All Rights Reserved
3 4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 -.TH SYSLOGD 1M "Oct 31, 2008"
7 +.TH SYSLOGD 1M "Oct 17, 2013"
7 8 .SH NAME
8 9 syslogd \- log system messages
9 10 .SH SYNOPSIS
10 11 .LP
11 12 .nf
12 13 \fB/usr/sbin/syslogd\fR [\fB-d\fR] [\fB-f\fR \fIconfigfile\fR] [\fB-m\fR \fImarkinterval\fR]
13 14 [\fB-p\fR \fIpath\fR] [\fB-t\fR | \fB-T\fR]
14 15 .fi
15 16
16 17 .SH DESCRIPTION
17 18 .sp
18 19 .LP
19 20 \fBsyslogd\fR reads and forwards system messages to the appropriate log files
20 21 or users, depending upon the priority of a message and the system facility from
21 22 which it originates. The configuration file \fB/etc/syslog.conf\fR (see
22 23 \fBsyslog.conf\fR(4)) controls where messages are forwarded. \fBsyslogd\fR logs
23 24 a mark (timestamp) message every \fImarkinterval\fR minutes (default \fB20\fR)
24 25 at priority \fBLOG_INFO\fR to the facility whose name is given as \fBmark\fR in
25 26 the \fBsyslog.conf\fR file.
26 27 .sp
27 28 .LP
28 29 A system message consists of a single line of text, which may be prefixed with
29 30 a priority code number enclosed in angle-brackets (\fB<\|>\fR); priorities are
30 31 defined in \fB<sys/syslog.h>\fR\&.
31 32 .sp
32 33 .LP
33 34 \fBsyslogd\fR reads from the \fBSTREAMS\fR log driver, \fB/dev/log\fR, and from
34 35 any transport provider specified in \fB/etc/netconfig\fR,
35 36 \fB/etc/net/transport/hosts\fR, and \fB/etc/net/transport/services\fR.
36 37 .sp
37 38 .LP
38 39 \fBsyslogd\fR reads the configuration file when it starts up, and again
39 40 whenever it receives a \fBHUP\fR signal (see \fBsignal.h\fR(3HEAD), at which
40 41 time it also closes all files it has open, re-reads its configuration file, and
41 42 then opens only the log files that are listed in that file. \fBsyslogd\fR exits
42 43 when it receives a \fBTERM\fR signal.
43 44 .sp
44 45 .LP
45 46 As it starts up, \fBsyslogd\fR creates the file \fB/var/run/syslog.pid\fR, if
46 47 possible, containing its process identifier (\fBPID\fR).
47 48 .sp
48 49 .LP
49 50 If message \fBID\fR generation is enabled (see \fBlog\fR(7D)), each message
50 51 will be preceded by an identifier in the following format: \fB[ID\fR \fImsgid
51 52 facility\fR\fB\&.\fR\fIpriority\fR\fB]\fR. \fImsgid\fR is the message's numeric
52 53 identifier described in \fBmsgid\fR(1M). \fIfacility\fR and \fIpriority\fR are
53 54 described in \fBsyslog.conf\fR(4). \fB[ID 123456 kern.notice]\fR is an example
54 55 of an identifier when message \fBID\fR generation is enabled.
↓ open down ↓ |
38 lines elided |
↑ open up ↑ |
55 56 .sp
56 57 .LP
57 58 If the message originated in a loadable kernel module or driver, the kernel
58 59 module's name (for example, \fBufs\fR) will be displayed instead of \fBunix\fR.
59 60 See \fBEXAMPLES\fR for sample output from \fBsyslogd\fR with and without
60 61 message \fBID\fR generation enabled.
61 62 .sp
62 63 .LP
63 64 In an effort to reduce visual clutter, message \fBID\fRs are not displayed when
64 65 writing to the console; message \fBID\fRs are only written to the log file.
65 -See .
66 +See \fBEXAMPLES\fR.
66 67 .sp
67 68 .LP
68 69 The \fB/etc/default/syslogd\fR file contains the following default parameter
69 70 settings, which are in effect if neither the \fB-t\fR nor \fB-T\fR option is
70 71 selected. See \fBFILES\fR.
71 72 .sp
72 73 .LP
73 74 The recommended way to allow or disallow message logging is through the use of
74 75 the service management facility (\fBsmf\fR(5)) property:
75 76 .sp
76 77 .in +2
77 78 .nf
78 79 svc:/system/system-log/config/log_from_remote
79 80 .fi
80 81 .in -2
81 82
82 83 .sp
83 84 .LP
84 85 This property specifies whether remote messages are logged.
85 86 \fBlog_from_remote=true\fR is equivalent to the \fB-t\fR command-line option
86 87 and \fBfalse\fR is equivalent to the \fB-T\fR command-line option. The default
87 88 value for \fB-log_from_remote\fR is \fBfalse\fR. See NOTES, below.
88 89 .sp
89 90 .ne 2
90 91 .na
91 92 \fB\fBLOG_FROM_REMOTE\fR\fR
92 93 .ad
93 94 .sp .6
94 95 .RS 4n
95 96 Specifies whether remote messages are logged. \fBLOG_FROM_REMOTE=NO\fR is
96 97 equivalent to the \fB-t\fR command-line option. The default value for
97 98 \fBLOG_FROM_REMOTE\fR is \fBYES\fR.
98 99 .RE
99 100
100 101 .SH OPTIONS
101 102 .sp
102 103 .LP
103 104 The following options are supported:
104 105 .sp
105 106 .ne 2
106 107 .na
107 108 \fB\fB-d\fR\fR
108 109 .ad
109 110 .sp .6
110 111 .RS 4n
111 112 Turn on debugging. This option should only be used interactively in a root
112 113 shell once the system is in multi-user mode. It should \fBnot\fR be used in the
113 114 system start-up scripts, as this will cause the system to hang at the point
114 115 where \fBsyslogd\fR is started.
115 116 .RE
116 117
117 118 .sp
118 119 .ne 2
119 120 .na
120 121 \fB\fB-f\fR \fIconfigfile\fR\fR
121 122 .ad
122 123 .sp .6
123 124 .RS 4n
124 125 Specify an alternate configuration file.
125 126 .RE
126 127
127 128 .sp
128 129 .ne 2
129 130 .na
130 131 \fB\fB-m\fR \fImarkinterval\fR\fR
131 132 .ad
132 133 .sp .6
133 134 .RS 4n
134 135 Specify an interval, in minutes, between mark messages.
135 136 .RE
136 137
137 138 .sp
138 139 .ne 2
139 140 .na
140 141 \fB\fB-p\fR \fIpath\fR\fR
141 142 .ad
142 143 .sp .6
143 144 .RS 4n
144 145 Specify an alternative log device name. The default is \fB/dev/log\fR.
↓ open down ↓ |
69 lines elided |
↑ open up ↑ |
145 146 .RE
146 147
147 148 .sp
148 149 .ne 2
149 150 .na
150 151 \fB\fB-T\fR\fR
151 152 .ad
152 153 .sp .6
153 154 .RS 4n
154 155 Enable the \fBsyslogd\fR \fBUDP\fR port to turn on logging of remote messages.
155 -This is the default behavior. See .
156 +This is the default behavior. See \fBEXAMPLES\fR.
156 157 .RE
157 158
158 159 .sp
159 160 .ne 2
160 161 .na
161 162 \fB\fB-t\fR\fR
162 163 .ad
163 164 .sp .6
164 165 .RS 4n
165 166 Disable the \fBsyslogd\fR \fBUDP\fR port to turn off logging of remote
166 -messages. See .
167 +messages. See \fBEXAMPLES\fR.
167 168 .RE
168 169
169 170 .SH EXAMPLES
170 171 .LP
171 172 \fBExample 1 \fR\fBsyslogd\fR Output Without Message ID Generation Enabled
172 173 .sp
173 174 .LP
174 175 The following example shows the output from \fBsyslogd\fR when message \fBID\fR
175 176 generation \fBis not\fR enabled:
176 177
177 178 .sp
178 179 .in +2
179 180 .nf
180 181 Sep 29 21:41:18 cathy unix: alloc /: file system full
181 182 .fi
182 183 .in -2
183 184 .sp
184 185
185 186 .LP
186 187 \fBExample 2 \fR\fBsyslogd\fR Output with ID generation Enabled
187 188 .sp
188 189 .LP
189 190 The following example shows the output from \fBsyslogd\fR when message \fBID\fR
190 191 generation \fBis\fR enabled. The message \fBID\fR is displayed when writing to
191 192 log file\fB/var/adm/messages\fR.
192 193
193 194 .sp
194 195 .in +2
195 196 .nf
196 197 Sep 29 21:41:18 cathy ufs: [ID 845546 kern.notice]
197 198 alloc /: file system full
198 199 .fi
199 200 .in -2
200 201 .sp
201 202
202 203 .LP
203 204 \fBExample 3 \fR\fBsyslogd\fR Output with ID Generation Enabled
204 205 .sp
205 206 .LP
206 207 The following example shows the output from \fBsyslogd\fR when message \fBID\fR
207 208 generation \fBis\fR enabled when writing to the console. Even though message ID
208 209 is enabled, the message \fBID\fR is not displayed at the console.
209 210
210 211 .sp
211 212 .in +2
212 213 .nf
213 214 Sep 29 21:41:18 cathy ufs: alloc /: file system full
214 215 .fi
215 216 .in -2
216 217 .sp
217 218
218 219 .LP
219 220 \fBExample 4 \fREnabling Acceptance of UDP Messages from Remote Systems
220 221 .sp
221 222 .LP
222 223 The following commands enable \fBsyslogd\fR to accept entries from remote
223 224 systems.
224 225
225 226 .sp
226 227 .in +2
227 228 .nf
228 229 # \fBsvccfg -s svc:/system/system-log setprop config/log_from_remote = true\fR
229 230 # \fBsvcadm restart svc:/system/system-log\fR
230 231 .fi
231 232 .in -2
232 233 .sp
233 234
234 235 .SH FILES
235 236 .sp
236 237 .ne 2
237 238 .na
238 239 \fB\fB/etc/syslog.conf\fR\fR
239 240 .ad
240 241 .sp .6
241 242 .RS 4n
242 243 Configuration file
243 244 .RE
244 245
245 246 .sp
246 247 .ne 2
247 248 .na
248 249 \fB\fB/var/run/syslog.pid\fR\fR
249 250 .ad
250 251 .sp .6
251 252 .RS 4n
252 253 Process \fBID\fR
253 254 .RE
254 255
255 256 .sp
256 257 .ne 2
257 258 .na
258 259 \fB\fB/etc/default/syslogd\fR\fR
259 260 .ad
260 261 .sp .6
261 262 .RS 4n
262 263 Contains default settings. You can override some of the settings by
263 264 command-line options.
264 265 .RE
265 266
266 267 .sp
267 268 .ne 2
268 269 .na
269 270 \fB\fB/dev/log\fR\fR
270 271 .ad
271 272 .sp .6
272 273 .RS 4n
273 274 \fBSTREAMS\fR log driver
274 275 .RE
275 276
276 277 .sp
277 278 .ne 2
278 279 .na
279 280 \fB\fB/etc/netconfig\fR\fR
280 281 .ad
281 282 .sp .6
282 283 .RS 4n
283 284 Transport providers available on the system
284 285 .RE
285 286
286 287 .sp
287 288 .ne 2
288 289 .na
289 290 \fB\fB/etc/net/transport/hosts\fR\fR
290 291 .ad
291 292 .sp .6
292 293 .RS 4n
293 294 Network hosts for each transport
294 295 .RE
295 296
296 297 .sp
297 298 .ne 2
298 299 .na
299 300 \fB\fB/etc/net/transport/services\fR\fR
300 301 .ad
301 302 .sp .6
302 303 .RS 4n
303 304 Network services for each transport
304 305 .RE
305 306
306 307 .SH SEE ALSO
307 308 .sp
308 309 .LP
309 310 \fBlogger\fR(1), \fBsvcs\fR(1), \fBmsgid\fR(1M), \fBsvcadm\fR(1M),
310 311 \fBsvccfg\fR(1M), \fBsyslog\fR(3C), \fBsyslog.conf\fR(4), \fBattributes\fR(5),
311 312 \fBsignal.h\fR(3HEAD), \fBsmf\fR(5), \fBlog\fR(7D)
312 313 .SH NOTES
313 314 .sp
314 315 .LP
315 316 The \fBmark\fR message is a system time stamp, and so it is only defined for
316 317 the system on which \fBsyslogd\fR is running. It can not be forwarded to other
317 318 systems.
318 319 .sp
319 320 .LP
320 321 When \fBsyslogd\fR receives a \fBHUP\fR signal, it attempts to complete
321 322 outputting pending messages, and close all log files to which it is currently
322 323 logging messages. If, for some reason, one (or more) of these files does not
323 324 close within a generous grace period, \fBsyslogd\fR discards the pending
324 325 messages, forcibly closes these files, and starts reconfiguration. If this
325 326 shutdown procedure is disturbed by an unexpected error and \fBsyslogd\fR cannot
326 327 complete reconfiguration, \fBsyslogd\fR sends a mail message to the superuser
327 328 on the current system stating that it has shut down, and exits.
328 329 .sp
329 330 .LP
330 331 Care should be taken to ensure that each window displaying messages forwarded
331 332 by \fBsyslogd\fR (especially console windows) is run in the system default
332 333 locale (which is \fBsyslogd\fR's locale). If this advice is not followed, it is
333 334 possible for a \fBsyslog\fR message to alter the terminal settings for that
334 335 window, possibly even allowing remote execution of arbitrary commands from that
335 336 window.
336 337 .sp
337 338 .LP
338 339 The \fBsyslogd\fR service is managed by the service management facility,
339 340 \fBsmf\fR(5), under the service identifier:
340 341 .sp
341 342 .in +2
342 343 .nf
343 344 svc:/system/system-log:default
344 345 .fi
345 346 .in -2
346 347 .sp
347 348
348 349 .sp
349 350 .LP
350 351 Administrative actions on this service, such as enabling, disabling, or
351 352 requesting restart, can be performed using \fBsvcadm\fR(1M). The service's
352 353 status can be queried using the \fBsvcs\fR(1) command.
353 354 .sp
354 355 .LP
355 356 When \fBsyslogd\fR is started by means of \fBsvcadm\fR(1M), if a value is
356 357 specified for \fBLOG_FROM_REMOTE\fR in the \fB/etc/defaults/syslogd\fR file,
357 358 the SMF property \fBsvc:/system/system-log/config/log_from_remote\fR is set to
358 359 correspond to the \fBLOG_FROM_REMOTE\fR value and the
359 360 \fB/etc/default/syslogd\fR file is modified to replace the
360 361 \fBLOG_FROM_REMOTE\fR specification with the following comment:
361 362 .sp
362 363 .in +2
363 364 .nf
364 365 # LOG_FROM_REMOTE is now set using svccfg(1m), see syslogd(1m).
365 366 .fi
366 367 .in -2
367 368
368 369 .sp
369 370 .LP
370 371 If neither \fBLOG_FROM_REMOTE\fR nor
371 372 \fBsvc:/system/system-log/config/log_from_remote\fR are defined, the default is
372 373 to log remote messages.
373 374 .sp
374 375 .LP
375 376 On installation, the initial value of
376 377 \fBsvc:/system/system-log/config/log_from_remote\fR is \fBfalse\fR.
↓ open down ↓ |
200 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX