1 .\" Copyright (c) 1983, 1986, 1991, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. Neither the name of the University nor the names of its contributors
13 .\" may be used to endorse or promote products derived from this software
14 .\" without specific prior written permission.
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" @(#)syslogd.8 8.1 (Berkeley) 6/6/93
36 .Nd log systems messages
39 .Op Fl 468ACcdFHkNnosTuv
40 .Op Fl a Ar allowed_peer
41 .Op Fl b Ar bind_address
42 .Op Fl f Ar config_file
43 .Op Fl l Oo Ar mode Ns \&: Oc Ns Ar path
44 .Op Fl M Ar fwd_length
45 .Op Fl m Ar mark_interval
48 .Op Fl p Ar log_socket
49 .Op Fl S Ar logpriv_socket
53 utility reads and logs messages to the system console,
56 machines and/or users as specified by its configuration file.
58 The options are as follows:
59 .Bl -tag -width indent
63 to use IPv4 addresses only.
67 to use IPv6 addresses only.
71 not to interfere with 8-bit data.
74 will replace C1 control characters
75 .Pq ISO 8859 and Unicode characters
79 Note, this option does not change the way
81 alters control characters
82 .Pq see Xr iscntrl 3 .
83 They will always be replaced with their
89 tries to send the message to only one address
90 even if the host has more than one A or AAAA record.
91 If this option is specified,
93 tries to send the message to all addresses.
94 .It Fl a Ar allowed_peer
102 options may be specified.
106 option may be any of the following:
107 .Bl -tag -width "ipaddr[/prefixlen][:service]XX"
119 Accept datagrams from
122 can be specified as an IPv4 address or as an IPv6
123 address enclosed with
129 is the name or number of an UDP service (see
131 the source packet must belong to.
136 accepts UDP packets from any source port.
143 is IPv4 address, a missing
145 will be substituted by the historic class A or class B netmasks if
147 belongs into the address range of class A or B,
155 will be substituted by 128.
158 .Ar domainname Op \&: Ar service
161 Accept datagrams where the reverse address lookup yields
163 for the sender address.
166 is as explained above.
168 can contain special characters of a shell-style pattern such as
174 options are ignored if the
176 option is also specified.
180 .Ar bind_address Op \&: Ar service
189 Bind to a specific address and/or port.
190 The address can be specified as a hostname,
191 and the port as a service name.
192 If an IPv6 address is specified, it should be enclosed with
200 This option can be specified multiple times to bind to
201 multiple addresses and/or ports.
203 Create log files that do not exist
204 .Pq permission is set to Ql Li 0600 .
206 Disable the compression of repeated instances of the same line
207 into a single line of the form
208 .Dq Li "last message repeated N times"
209 when the output is a pipe to another program.
211 disable this compression in all cases.
216 This is probably only of use to developers working on
218 .It Fl f Ar config_file
219 Specify the pathname of an alternate configuration file;
221 .Pa /etc/syslog.conf .
226 rather than going into daemon mode.
227 This is useful if some other process uses
233 and wants to monitor when and how it exits.
235 When logging remote messages use hostname from the message (if supplied)
236 instead of using address from which the message was received.
238 Disable the translation of
239 messages received with facility
245 facility is reserved for messages read directly from
247 .It Fl M Ar fwd_length
248 Set the limit on the length of forwarded messages.
249 The minimum is 480 octets.
250 The maximum for RFC 3164 output format is 1024 octets.
251 The default is 1024 octets.
252 .It Fl m Ar mark_interval
253 Select the number of minutes between
256 the default is 20 minutes.
258 Disable binding on UDP sockets.
259 RFC 3164 recommends that outgoing
261 messages should originate from the privileged port,
264 the recommended behavior.
268 Disable DNS query for every request.
270 Select the output format of generated log messages.
275 are used to generate RFC 3164 log messages.
280 are used to generate RFC 5424 log messages,
281 having RFC 3339 timestamps with microsecond precision.
282 The default is to generate RFC 3164 log messages.
284 Prefix kernel messages with the full kernel boot file as determined by
286 Without this, the kernel message prefix is always
288 .It Fl p Ar log_socket
289 Specify the pathname of an alternate log socket to be used instead;
295 the default pathname is replaced with the specified one.
298 options are specified,
299 the remaining pathnames are treated as additional log sockets.
301 Specify an alternative file in which to store the process ID.
303 .Pa /var/run/syslog.pid .
304 .It Fl S Ar logpriv_socket
305 Specify the pathname of an alternate log socket for privileged
306 applications to be used instead;
308 .Pa /var/run/logpriv .
312 the default pathname is replaced with the specified one.
315 options are specified,
316 the remaining pathnames are treated as additional log sockets.
317 .It Fl l Oo Ar mode Ns \&: Oc Ns Ar path
318 Specify a location where
320 should place an additional log socket.
321 The primary use for this is to place additional log sockets in
323 of various chroot filespaces.
324 File permissions for socket can be specified in octal representation in
326 delimited with a colon.
327 The socket location must be specified as an absolute pathname in
330 Operate in secure mode.
331 Do not log messages from remote machines.
333 no network socket will be opened at all,
334 which also disables logging to remote machines.
336 Always use the local time and date for messages received from the network,
337 instead of the timestamp field supplied in the message by the remote host.
338 This is useful if some of the originating hosts cannot keep time properly
339 or are unable to generate a correct timestamp.
341 Unique priority logging.
342 Only log messages at the specified priority.
344 messages at the stated priority or higher are logged.
345 This option changes the default comparison from
352 the numeric facility and priority are
353 logged with each locally-written message.
354 If specified more than once,
355 the names of the facility and priority are logged with each locally-written
358 This option only affects the formatting of RFC 3164 messages.
359 Messages formatted according to RFC 5424 always include a
360 facility/priority number.
365 utility reads its configuration file when it starts up and whenever it
366 receives a hangup signal.
367 For information on the format of the configuration file,
373 utility reads messages from the
378 .Pa /var/run/logpriv ,
379 from an Internet domain socket specified in
381 and from the special device
383 .Pq to read kernel messages .
387 utility creates its process ID file,
389 .Pa /var/run/syslog.pid ,
390 and stores its process
392 This can be used to kill or reconfigure
397 should consist of a single line.
398 The message can contain a priority code,
399 which should be a preceding
400 decimal number in angle braces,
403 This priority code should map into the priorities defined in the
407 For security reasons,
409 will not append to log files that do not exist
413 therefore, they must be created manually before running
416 The date and time are taken from the received message.
417 If the format of the timestamp field is incorrect,
418 time obtained from the local host is used instead.
419 This can be overridden by the
423 .Bl -tag -width /var/run/syslog.pid -compact
424 .It Pa /etc/syslog.conf
426 .It Pa /var/run/syslog.pid
427 default process ID file
431 domain datagram log socket
432 .It Pa /var/run/logpriv
434 socket for privileged applications
460 The ability to log messages received in UDP packets is equivalent to
461 an unauthenticated remote disk-filling service,
462 and should probably be disabled by default.
464 .No inter- Ns Nm syslogd
465 authentication mechanism ought to be worked out.
466 To prevent the worst abuse,
469 option is therefore highly recommended.
473 matching algorithm does not pretend to be very efficient;
474 use of numeric IP addresses is faster than domain name comparison.
475 Since the allowed peer list is being walked linearly,
476 peer groups where frequent messages are being anticipated
477 from should be put early into the
481 The log socket was moved from
483 to ease the use of a read-only root file system.
485 some old binaries so that a symbolic link might be used for a