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.\" $FreeBSD$ 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. 54.Pp 55The options are as follows: 56.Bl -tag -width indent 57.It Fl a Ar allowed_peer 58Allow 59.Ar allowed_peer 60to log to this 61.Nm 62using UDP datagrams. Multiple 63.Fl a 64options may be specified. 65.Pp 66.Ar Allowed_peer 67can be any of the following: 68.Bl -tag -width "ipaddr/masklen[:service]XX" 69.It Ar ipaddr/masklen Ns Op Ar :service 70Accept datagrams from 71.Ar ipaddr 72(in the usual dotted quad notation) with 73.Ar masklen 74bits being taken into account when doing the address comparision. If 75specified, 76.Ar service 77is the name or number of an UDP service (see 78.Xr services 5 ) Ns 79the source packet must belong to. A 80.Ar service 81of 82.Ql \&* 83allows packets being sent from any UDP port. The default 84.Ar service 85is 86.Ql syslog . 87A missing 88.Ar masklen 89will be substituted by the historic class A or class B netmasks if 90.Ar ipaddr 91belongs into the address range of class A or B, respectively, or 92by 24 otherwise. 93.It Ar domainname Ns Op Ar :service 94Accept datagrams where the reverse address lookup yields 95.Ar domainname 96for the sender address. The meaning of 97.Ar service 98is as explained above. 99.It Ar *domainname Ns Op Ar :service 100Same as before, except that any source host whose name 101.Em ends 102in 103.Ar domainname 104will get permission. 105.El 106.It Fl d 107Put 108.Nm 109into debugging mode. This is probably only of use to developers working on 110.Nm Ns . 111.It Fl f 112Specify the pathname of an alternate configuration file; 113the default is 114.Pa /etc/syslog.conf . 115.It Fl m 116Select the number of minutes between 117.Dq mark 118messages; the default is 20 minutes. 119.It Fl n 120Disable dns query for every request. 121.It Fl p 122Specify the pathname of an alternate log socket to be used instead; 123the default is 124.Pa /var/run/log . 125.It Fl l 126Specify a location where 127.Nm 128should place an additional log socket. 129Up to 19 additional logging sockets can be specified. 130The primary use for this is to place additional log sockets in 131.Pa /var/run/log 132of various chroot filespaces. 133.It Fl s 134Operate in secure mode. Do not log messages from remote machines. If 135specified twice, no network socket will be opened at all, which also 136disables logging to remote machines. 137.It Fl u 138Unique priority logging. Only log messages at the specified priority. 139Without this option, messages at the stated priority or higher are logged. 140This option changes the default comparison from 141.Dq => 142to 143.Dq = . 144.It Fl v 145Verbose logging. If specified once, the numeric facility and priority are 146logged with each locally-written message. If specified more than once, 147the names of the facility and priority are logged with each locally-written 148message. 149.El 150.Pp 151The 152.Nm 153daemon reads its configuration file when it starts up and whenever it 154receives a hangup signal. 155For information on the format of the configuration file, 156see 157.Xr syslog.conf 5 . 158.Pp 159The 160.Nm 161daemon reads messages from the 162.Tn UNIX 163domain socket 164.Pa /var/run/log , 165from an Internet domain socket specified in 166.Pa /etc/services , 167and from the special device 168.Pa /dev/klog 169(to read kernel messages). 170.Pp 171The 172.Nm 173daemon creates the file 174.Pa /var/run/syslog.pid , 175and stores its process 176id there. 177This can be used to kill or reconfigure 178.Nm Ns . 179.Pp 180The message sent to 181.Nm 182should consist of a single line. 183The message can contain a priority code, which should be a preceding 184decimal number in angle braces, for example, 185.Sq Aq 5. 186This priority code should map into the priorities defined in the 187include file 188.Aq Pa sys/syslog.h . 189.Sh FILES 190.Bl -tag -width /var/run/syslog.pid -compact 191.It Pa /etc/syslog.conf 192configuration file 193.It Pa /var/run/syslog.pid 194process id of current 195.Nm 196.It Pa /var/run/log 197name of the 198.Tn UNIX 199domain datagram log socket 200.It Pa /dev/klog 201kernel log device 202.El 203.Sh SEE ALSO 204.Xr logger 1 , 205.Xr syslog 3 , 206.Xr services 5 , 207.Xr syslog.conf 5 208.Sh HISTORY 209The 210.Nm 211command appeared in 212.Bx 4.3 . 213.Pp 214The 215.Fl a , 216.Fl s , 217.Fl u , 218and 219.Fl v 220options are 221.Fx 2.2 222extensions. 223.Sh BUGS 224The ability to log messages received in UDP packets is equivalent to 225an unauthenticated remote disk-filling service, and should probably be 226disabled by default. Some sort of 227.No inter- Ns Nm syslogd 228authentication mechanism ought to be worked out. To prevent the worst 229abuse, use of the 230.Fl a 231option is therefore highly recommended. 232.Pp 233The 234.Fl a 235matching algorithm doesn't pretend to be very efficient; use of numeric 236IP addresses is faster than domain name comparision. Since the allowed 237peer list is being walked linearly, peer groups where frequent messages 238are being anticipated from should be put early into the 239.Fl a 240list. 241.Pp 242The log socket was moved from 243.Pa /dev 244to ease the use of a read-only root filesystem. 245This may confuse 246some old binaries so that a symbolic link might be used for a 247transitional period. 248