1.\" $NetBSD: syslogd.8,v 1.19 2000/07/11 12:43:50 ad 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 February 18, 1999 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 dsS 45.Bk -words 46.Op Fl f Ar config_file 47.Ek 48.Bk -words 49.Op Fl m Ar mark_interval 50.Ek 51.Bk -words 52.Op Fl P Ar file_list 53.Ek 54.Bk -words 55.Op Fl p Ar log_socket 56.Ek 57.Bk -words 58.Op Fl p Ar log_socket2 ... 59.Ek 60.Sh DESCRIPTION 61.Nm 62reads and logs messages to the system console, log files, other 63machines and/or users as specified by its configuration file. 64The options are as follows: 65.Bl -tag -width Ds 66.It Fl d 67Enable debugging to the standard output, 68and do not disassociate from the controlling terminal. 69.It Fl f 70Specify the pathname of an alternative configuration file; 71the default is 72.Pa /etc/syslog.conf . 73.It Fl m 74Select the number of minutes between ``mark'' messages; 75the default is 20 minutes. 76.It Fl s 77Select ``secure'' mode, in which syslogd does not listen on a UDP socket but 78only communicates over a 79.Ux 80domain socket. 81This is valuable when the machine on 82which syslogd runs is subject to attack over the network and it is desired 83that the machine be protected from attempts to remotely fill logs 84and similar attacks. 85.It Fl p 86Specify the pathname of an log socket. Multiple 87.Fl p 88options create multiple log sockets. If no -p arguments are created, 89the default socket of 90.Pa /var/run/log 91is used. 92.It Fl P 93Specify the pathname of a file containing a list of sockets to be 94created. The format of the file is simply one socket per line. 95.El 96.Pp 97.Nm 98reads its configuration file when it starts up and whenever it 99receives a hangup signal. 100For information on the format of the configuration file, 101see 102.Xr syslog.conf 5 . 103.Pp 104.Nm 105reads messages from the 106.Ux 107domain socket 108.Pa /var/run/log , 109from an Internet domain socket specified in 110.Pa /etc/services , 111and from the special device 112.Pa /dev/klog 113(to read kernel messages). 114.Pp 115.Nm 116creates the file 117.Pa /var/run/syslogd.pid , 118and stores its process 119id there. 120This can be used to kill or reconfigure 121.Nm "" . 122.Pp 123By using multiple 124.Fl p 125options, one can setup many chroot environments by passing the pathname 126to the log socket 127.Pa ( /var/run/log ) 128in each chroot area to syslogd. For example: 129.Dl syslogd -p /var/run/log -p /web/var/run/log -p /ftp/var/run/log 130.Pp 131note: the normal log socket must now also be passed to syslogd. 132.Sh SYSLOG PROTOCOL NOTES 133.Pp 134The message sent to 135.Nm 136should consist of a single line. 137The message can contain a priority code, which should be a preceding 138decimal number in angle braces, for example, 139.Sq Aq 5. 140This priority code should map into the priorities defined in the 141include file 142.Aq Pa sys/syslog.h . 143.Sh FILES 144.Bl -tag -width /var/run/syslogd.pid -compact 145.It Pa /etc/syslog.conf 146The configuration file. 147.It Pa /var/run/syslogd.pid 148The process id of current 149.Nm "" . 150.It Pa /var/run/log 151Name of the 152.Ux 153domain datagram log socket. 154.It Pa /dev/klog 155The kernel log device. 156.El 157.Sh SEE ALSO 158.Xr logger 1 , 159.Xr newsyslog 8 , 160.Xr syslog 3 , 161.Xr services 5 , 162.Xr syslog.conf 5 163.Sh HISTORY 164The 165.Nm 166command appeared in 167.Bx 4.3 . 168Support for multiple log sockets appeared in 169.Nx 1.4 . 170