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