1.\" $NetBSD: syslogd.8,v 1.27 2002/05/25 14:21:02 wiz Exp $ 2.\" 3.\" Copyright (c) 1983, 1986, 1991, 1993 4.\" The Regents of the University of California. All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 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. All advertising materials mentioning features or use of this software 15.\" must display the following acknowledgement: 16.\" This product includes software developed by the University of 17.\" California, Berkeley and its contributors. 18.\" 4. Neither the name of the University nor the names of its contributors 19.\" may be used to endorse or promote products derived from this software 20.\" without specific prior written permission. 21.\" 22.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32.\" SUCH DAMAGE. 33.\" 34.\" from: @(#)syslogd.8 8.1 (Berkeley) 6/6/93 35.\" 36.Dd May 25, 2002 37.Dt SYSLOGD 8 38.Os 39.Sh NAME 40.Nm syslogd 41.Nd log systems messages 42.Sh SYNOPSIS 43.Nm 44.Op Fl dns 45.Bk -words 46.Op Fl f Ar config_file 47.Ek 48.Bk -words 49.Op Fl g Ar group 50.Ek 51.Bk -words 52.Op Fl m Ar mark_interval 53.Ek 54.Bk -words 55.Op Fl P Ar file_list 56.Ek 57.Bk -words 58.Oo 59.Fl p Ar log_socket 60.Op Fl p Ar log_socket2 ... 61.Oc 62.Ek 63.Bk -words 64.Op Fl t Ar chroot_dir 65.Ek 66.Bk -words 67.Op Fl u Ar user 68.Ek 69.Sh DESCRIPTION 70.Nm 71reads and logs messages to the system console, log files, other 72machines and/or users as specified by its configuration file. 73The options are as follows: 74.Bl -tag -width 15n 75.It Fl d 76Enable debugging to the standard output, 77and do not disassociate from the controlling terminal. 78.It Fl f 79Specify the pathname of an alternative configuration file; 80the default is 81.Pa /etc/syslog.conf . 82.It Fl g Ar group 83Set GID to 84.Ar group 85after the sockets and log files have been opened. 86.It Fl m 87Select the number of minutes between ``mark'' messages; 88the default is 20 minutes. 89.It Fl n 90Do not perform hostname lookups; report only numeric addresses. 91.It Fl P 92Specify the pathname of a file containing a list of sockets to be 93created. The format of the file is simply one socket per line. 94.It Fl p 95Specify the pathname of a log socket. Multiple 96.Fl p 97options create multiple log sockets. If no 98.Fl p 99arguments are created, the default socket of 100.Pa /var/run/log 101is used. 102.It Fl s 103Select 104.Dq secure 105mode, in which 106.Nm 107does not listen on a UDP socket but only communicates over a 108.Ux 109domain socket. 110This is valuable when the machine on 111which 112.Nm 113runs is subject to attack over the network and it is desired 114that the machine be protected from attempts to remotely fill logs 115and similar attacks. 116.It Fl t Ar chroot_dir 117.Xr chroot 2 118to 119.Ar chroot_dir 120after the sockets and log files have been opened. 121.It Fl u Ar user 122Set UID to 123.Ar user 124after the sockets and log files have been opened. 125.El 126.Pp 127.Nm 128reads its configuration file when it starts up and whenever it 129receives a hangup signal. 130For information on the format of the configuration file, 131see 132.Xr syslog.conf 5 . 133.Pp 134.Nm 135reads messages from the 136.Ux 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 145.Nm 146creates the file 147.Pa /var/run/syslogd.pid , 148and stores its process 149id there. 150This can be used to kill or reconfigure 151.Nm "" . 152.Pp 153By using multiple 154.Fl p 155options, one can setup many chroot environments by passing the pathname 156to the log socket 157.Pa ( /var/run/log ) 158in each chroot area to 159.Nm "" . 160For example: 161.Dl syslogd -p /var/run/log -p /web/var/run/log -p /ftp/var/run/log 162.Pp 163Note: the normal log socket must now also be passed to 164.Nm "" . 165.Pp 166Accesses from UDP socket can be filtered by libwrap configuration files, like 167.Pa /etc/hosts.deny . 168Specify 169.Dq Li syslogd 170in 171.Ar daemon_list 172portion of the configuration files. 173Refer to 174.Xr hosts_access 5 175for details. 176.Ss SYSLOG PROTOCOL NOTES 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/syslogd.pid -compact 188.It Pa /etc/syslog.conf 189The configuration file. 190.It Pa /var/run/syslogd.pid 191The process id of current 192.Nm "" . 193.It Pa /var/run/log 194Name of the 195.Ux 196domain datagram log socket. 197.It Pa /dev/klog 198The kernel 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.Xr newsyslog 8 206.Sh HISTORY 207The 208.Nm 209command appeared in 210.Bx 4.3 . 211Support for multiple log sockets appeared in 212.Nx 1.4 . 213libwrap support appeared in 214.Nx 1.6 . 215