1 .\" $NetBSD: syslogd.8,v 1.48 2009/07/16 13:33:44 yamt Exp $
3 .\" Copyright (c) 1983, 1986, 1991, 1993
4 .\" The Regents of the University of California. All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" from: @(#)syslogd.8 8.1 (Berkeley) 6/6/93
37 .Nd log systems messages
42 .Op Fl b Ar bind_address
45 .Op Fl f Ar config_file
51 .Op Fl m Ar mark_interval
54 .Op Fl o Ar output_format
62 .Op Fl p Ar log_socket2 ...
66 .Op Fl t Ar chroot_dir
73 reads and logs messages to the system console, log files, other
74 machines and/or users as specified by its configuration file.
75 The options are as follows:
77 .It Fl b Ar bind_address
78 Specify one specific IP address or hostname to bind to.
79 If a hostname is specified, the IPv4 or IPv6 address
80 which corresponds to it is used.
82 Enable debugging to the standard output,
83 and do not disassociate from the controlling terminal.
84 .It Fl f Ar config_file
85 Specify the pathname of an alternative configuration file;
87 .Pa /etc/syslog.conf .
91 after the sockets and log files have been opened.
92 .It Fl m Ar mark_interval
93 Select the number of minutes between ``mark'' messages;
94 the default is 20 minutes.
96 Do not perform hostname lookups; report only numeric addresses.
97 .It Fl o Ar output_format
98 Select output message format.
101 traditional BSD Syslog format (default)
103 new syslog-protocol format
106 Specify the pathname of a file containing a list of sockets to be
108 The format of the file is simply one socket per line.
109 .It Fl p Ar log_socket
110 Specify the pathname of a log socket.
113 options create multiple log sockets.
116 arguments are created, the default socket of
120 Disable the compression of repeated instances of the same line
121 into a single line of the form
122 .Dq last message repeated N times .
124 Sync kernel messages to disk immediately.
130 does not listen on a UDP socket but only communicates over a
133 This is valuable when the machine on
136 runs is subject to attack over the network and it is desired
137 that the machine be protected from attempts to remotely fill logs
139 .It Fl t Ar chroot_dir
143 after the sockets and log files have been opened.
145 Always use the local time and date for messages received from the
146 network, instead of the timestamp field supplied in the message
148 This is useful if some of the originating hosts can't keep time
149 properly or are unable to generate a correct timestamp.
153 after the sockets and log files have been opened.
155 Unique priority logging.
156 Only log messages at the priority specified by the selector in the
158 Without this option, messages at the specified priority or higher are
160 This option changes the default priority comparison from
166 If specified once, the numeric facility and priority are logged with
167 each locally-written message.
168 If specified more than once, the names of the facility and priority are
169 logged with each locally-written message.
173 reads its configuration file when it starts up and whenever it
174 receives a hangup signal.
175 For information on the format of the configuration file,
180 reads messages from the
184 from an Internet domain socket specified in
186 and from the special device
188 (to read kernel messages).
192 .Pa /var/run/syslogd.pid ,
193 and stores its process
195 This can be used to kill or reconfigure
200 options, one can set up many chroot environments by passing the pathname
203 in each chroot area to
206 .Dl syslogd -p /var/run/log -p /web/var/run/log -p /ftp/var/run/log
208 Note: the normal log socket must now also be passed to
211 The logged message includes the date, time, and hostname (or pathname of
213 Commonly, the program name and the process id is included.
215 The date and time are taken from the received message.
216 If the format of the timestamp field is incorrect, time obtained from
217 the local host is used instead.
218 This can be overridden by the
222 Accesses from UDP socket can be filtered by libwrap configuration files, like
223 .Pa /etc/hosts.deny .
228 portion of the configuration files.
232 .Ss SYSLOG PROTOCOL NOTES
234 accepts messages in traditional BSD Syslog or in newer Syslog Protocol
236 See RFC 3164 (BSD Syslog) and RFC 5424 (Syslog Protocol) for detailed
237 description of the message format.
238 Messages from the local kernel that are not tagged with a priority code
239 receive the default facility
243 All other untagged messages receive the default facility
248 .Bl -tag -width /var/run/syslogd.pid -compact
249 .It Pa /etc/syslog.conf
250 The configuration file.
251 .It Pa /var/run/syslogd.pid
252 The process id of current
257 domain datagram log socket.
259 The kernel log device.
271 .%T The BSD syslog Protocol
277 .%T The Syslog Protocol
284 Support for multiple log sockets appeared in
286 libwrap support appeared in