1.\" Copyright (c) 1983, 1986, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 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. All advertising materials mentioning features or use of this software 13.\" must display the following acknowledgement: 14.\" This product includes software developed by the University of 15.\" California, Berkeley and its contributors. 16.\" 4. Neither the name of the University nor the names of its contributors 17.\" may be used to endorse or promote products derived from this software 18.\" without specific prior written permission. 19.\" 20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" @(#)syslogd.8 8.1 (Berkeley) 6/6/93 33.\" $Id: syslogd.8,v 1.15 1998/06/25 19:39:18 guido Exp $ 34.\" 35.Dd October 12, 1995 36.Dt SYSLOGD 8 37.Os BSD 4.2 38.Sh NAME 39.Nm syslogd 40.Nd log systems messages 41.Sh SYNOPSIS 42.Nm 43.Op Fl dsuv 44.Op Fl a Ar allowed_peer 45.Op Fl f Ar config_file 46.Op Fl m Ar mark_interval 47.Op Fl p Ar log_socket 48.Op Fl l Ar path 49.Sh DESCRIPTION 50The 51.Nm 52daemon reads and logs messages to the system console, log files, other 53machines and/or users as specified by its configuration file. 54The options are as follows: 55.Bl -tag -width indent 56.It Fl a Ar allowed_peer 57Allow 58.Ar allowed_peer 59to log to this 60.Nm 61using UDP datagrams. Multiple 62.Fl a 63options may be specified. 64.Pp 65.Ar Allowed_peer 66can be any of the following: 67.Bl -tag -width "ipaddr/masklen[:service]XX" 68.It Ar ipaddr/masklen Ns Op Ar :service 69Accept datagrams from 70.Ar ipaddr 71(in the usual dotted quad notation) with 72.Ar masklen 73bits being taken into account when doing the address comparision. If 74specified, 75.Ar service 76is the name or number of an UDP service (see 77.Xr services 5 ) Ns 78the source packet must belong to. A 79.Ar service 80of 81.Ql \&* 82allows packets being sent from any UDP port. The default 83.Ar service 84is 85.Ql syslog . 86A missing 87.Ar masklen 88will be substituted by the historic class A or class B netmasks if 89.Ar ipaddr 90belongs into the address range of class A or B, respectively, or 91by 24 otherwise. 92.It Ar domainname Ns Op Ar :service 93Accept datagrams where the reverse address lookup yields 94.Ar domainname 95for the sender address. The meaning of 96.Ar service 97is as explained above. 98.It Ar *domainname Ns Op Ar :service 99Same as before, except that any source host whose name 100.Em ends 101in 102.Ar domainname 103will get permission. 104.El 105.It Fl d 106Put 107.Nm 108into debugging mode. This is probably only of use to developers working on 109.Nm Ns . 110.It Fl f 111Specify the pathname of an alternate configuration file; 112the default is 113.Pa /etc/syslog.conf . 114.It Fl m 115Select the number of minutes between 116.Dq mark 117messages; the default is 20 minutes. 118.It Fl p 119Specify the pathname of an alternate log socket to be used instead; 120the default is 121.Pa /var/run/log . 122.It Fl l 123Specify a location where 124.Nm syslogd 125should place an additional log socket. 126Up to 19 additional logging sockets can be specified. 127The primary use for this is to place additional log sockets in 128.Pa /dev/log 129of various chroot filespaces. 130.It Fl s 131Operate in secure mode. Do not log messages from remote machines. 132The messages will be received and counted and a log entry produced every time 133the count exceeds a power of two. 134.It Fl u 135Unique priority logging. Only log messages at the specified priority. 136Without this option, messages at the stated priority or higher are logged. 137This option changes the default comparison from 138.Dq => 139to 140.Dq = . 141.It Fl v 142Verbose logging. If specified once, the numeric facility and priority are 143logged with each locally-written message. If specified more than once, 144the names of the facility and priority are logged with each locally-written 145message. 146.El 147.Pp 148The 149.Nm 150daemon reads its configuration file when it starts up and whenever it 151receives a hangup signal. 152For information on the format of the configuration file, 153see 154.Xr syslog.conf 5 . 155.Pp 156The 157.Nm 158daemon reads messages from the 159.Tn UNIX 160domain socket 161.Pa /var/run/log , 162from an Internet domain socket specified in 163.Pa /etc/services , 164and from the special device 165.Pa /dev/klog 166(to read kernel messages). 167.Pp 168The 169.Nm 170daemon creates the file 171.Pa /var/run/syslog.pid , 172and stores its process 173id there. 174This can be used to kill or reconfigure 175.Nm Ns . 176.Pp 177The message sent to 178.Nm 179should consist of a single line. 180The message can contain a priority code, which should be a preceding 181decimal number in angle braces, for example, 182.Sq Aq 5. 183This priority code should map into the priorities defined in the 184include file 185.Aq Pa sys/syslog.h . 186.Sh FILES 187.Bl -tag -width /var/run/syslog.pid -compact 188.It Pa /etc/syslog.conf 189configuration file 190.It Pa /var/run/syslog.pid 191process id of current 192.Nm 193.It Pa /var/run/log 194name of the 195.Tn UNIX 196domain datagram log socket 197.It Pa /dev/klog 198kernel log device 199.El 200.Sh SEE ALSO 201.Xr logger 1 , 202.Xr syslog 3 , 203.Xr services 5 , 204.Xr syslog.conf 5 205.Sh HISTORY 206The 207.Nm 208command appeared in 209.Bx 4.3 . 210.Pp 211The 212.Fl a , 213.Fl s , 214.Fl u , 215and 216.Fl v 217options are 218.Fx 2.2 219extensions. 220.Sh BUGS 221The ability to log messages received in UDP packets is equivalent to 222an unauthenticated remote disk-filling service, and should probably be 223disabled by default. Some sort of 224.No inter- Ns Nm syslogd 225authentication mechanism ought to be worked out. To prevent the worst 226abuse, use of the 227.Fl a 228option is therefore highly recommended. 229.Pp 230The 231.Fl a 232matching algorithm doesn't pretend to be very efficient; use of numeric 233IP addresses is faster than domain name comparision. Since the allowed 234peer list is being walked linearly, peer groups where frequent messages 235are being anticipated from should be put early into the 236.Fl a 237list. 238.Pp 239The log socket was moved from 240.Pa /dev 241to ease the use of a read-only root filesystem. This may confuse 242some old binaries so that a symbolic link might be used for a 243transitional period. 244