xref: /netbsd-src/usr.sbin/syslogd/syslogd.8 (revision dc306354b0b29af51801a7632f1e95265a68cd81)
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 acknowledgment:
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.\"     from: @(#)syslogd.8	8.1 (Berkeley) 6/6/93
33.\"	$NetBSD: syslogd.8,v 1.8 1998/04/28 06:00:58 fair Exp $
34.\"
35.Dd June 6, 1993
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 d
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
49.Nm
50reads and logs messages to the system console, log files, other
51machines and/or users as specified by its configuration file.
52The options are as follows:
53.Bl -tag -width Ds
54.It Fl d
55Enable debugging to the standard output,
56and do not disassociate from the controlling terminal.
57.It Fl f
58Specify the pathname of an alternative configuration file;
59the default is
60.Pa /etc/syslog.conf .
61.It Fl m
62Select the number of minutes between ``mark'' messages;
63the default is 20 minutes.
64.It Fl s
65Select ``secure'' mode, in which syslogd does not open a UDP socket but
66only communicates over a
67.Ux
68domain socket.
69This is valuable when the machine on
70which syslogd runs is subject to attack over the network and it is desired
71that the machine be protected from attempts to remotely fill logs
72and similar attacks.
73.It Fl p
74Specify the pathname of an alternative log socket;
75the default is
76.Pa /dev/log .
77.El
78.Pp
79.Nm
80reads its configuration file when it starts up and whenever it
81receives a hangup signal.
82For information on the format of the configuration file,
83see
84.Xr syslog.conf 5 .
85.Pp
86.Nm
87reads messages from the
88.Ux
89domain socket
90.Pa /dev/log ,
91from an Internet domain socket specified in
92.Pa /etc/services ,
93and from the special device
94.Pa /dev/klog
95(to read kernel messages).
96.Pp
97.Nm
98creates the file
99.Pa /var/run/syslog.pid ,
100and stores its process
101id there.
102This can be used to kill or reconfigure
103.Nm "" .
104.Pp
105The message sent to
106.Nm
107should consist of a single line.
108The message can contain a priority code, which should be a preceding
109decimal number in angle braces, for example,
110.Sq Aq 5.
111This priority code should map into the priorities defined in the
112include file
113.Aq Pa sys/syslog.h .
114.Sh FILES
115.Bl -tag -width /var/run/syslog.pid -compact
116.It Pa /etc/syslog.conf
117The configuration file.
118.It Pa /var/run/syslog.pid
119The process id of current
120.Nm "" .
121.It Pa /dev/log
122Name of the
123.Ux
124domain datagram log socket.
125.It Pa /dev/klog
126The kernel log device.
127.El
128.Sh SEE ALSO
129.Xr logger 1 ,
130.Xr syslog 3 ,
131.Xr services 5 ,
132.Xr syslog.conf 5
133.Sh HISTORY
134The
135.Nm
136command appeared in
137.Bx 4.3 .
138