minix3/man/man8/syslogd.8

211 lines
6.2 KiB
Groff

.\" Copyright 1994 Dr. Greg Wettstein, Enjellic Systems Development.
.\" May be distributed under the GNU General Public License
.\" Sun Aug 30 11:35:55 MET: Martin Schulze: Updates
.\"
.\" from SYSKLOGD 8 "13 December 1995" "Version 1.3" "Linux System Administration"
.\" Modified for Minix porting by G. Falzoni <gfalzoni@inwind.it>
.\"
.\" Local macros
.de Xr
.BR \\$1 (\\$2)\\$3
..
.de LB
.TP \\$1
\\fB\\$2\\fR
\\$3
..
.de LI
.TP \\$1
\\fI\\$2\\fR
\\$3
..
.de LR
.TP \\$1
\\fR\\$2\\fR
\\$3
..
.\" end local macros
.TH SYSLOGD 8 "Jan. 23, 2000"
.SH NAME
.PP
syslogd \- system logging daemon.
.SH SYNOPSIS
.PP
.B syslogd
.RB [ " \-d " ]
.RB [ " \-f "
.I config file
]
.RB [ " \-m "
.I interval
]
.RB [ " \-p"
.IB port
]
.RB [ " \-v " ]
.LP
.SH DESCRIPTION
.PP
System logging is provided by a version of
.BR syslogd (8)
derived from the
stock BSD sources.
.B Syslogd
provides the kind of logging that many modern programs use. Every logged
message contains at least a time, a hostname field and a
program name field, but that depends on how trusty the logging
program is.
.PP
While the syslogd sources have been heavily modified a couple of notes
are necessary. First of all there has been a systematic attempt to
insure that syslogd follows the default, standard BSD behavior.
The second important concept to note is that this version of syslogd
interacts transparently with the version of syslog found in the
standard libraries, so you must insure that the correct versions are installed.
.PP
The main configuration file
.I /etc/syslog.conf
or an alternative file, given with the
.B "\-f"
option, is read at startup. Any line that begins with the hash mark
(``#'') and empty lines are ignored. If an error occurs during parsing
the whole line is ignored.
.SH OPTIONS
.PP
.LB 9 "-d" "Turns on debug mode.
When using debug mode, the daemon will not proceed to
.BR fork (2)
to set itself in the background, but will stay in the
foreground and write much debug information on the current tty. See the
DEBUGGING section for more information.
.LB 9 "\-f config file" "Specify an alternative configuration file instead of
.IR /etc/syslog.conf ","
which is the default.
.LB 9 "\-m interval" "The syslogd logs a mark timestamp regularly. The default
.I interval
between two
.I \-\- MARK \-\-
lines is 20 minutes. This can be changed with this option.
.LB 9 "\-p port" "You can specify an alternative port instead of
.I syslog/udp
default service.
.LB 9 "\-v" "Print version and exit.
.SH SIGNALS
.PP
.B Syslogd
reacts to a set of signals. You may easily send a signal to it
using the following:
.IP
kill -SIGNAL `cat /usr/run/syslogd.pid`
.LB 9 SIGHUP "This lets syslogd perform a re-initialization.
All open files are closed, the configuration file (default
is '/etc/syslog.conf') will be reread.
.LB 9 SIGTERM "The syslogd will die.
.LB 9 "SIGINT SIGQUIT" "If debugging is enabled these are ignored, otherwise
syslogd will die.
.LB 9 SIGALRM "Every time syslogd receives this signal it will log
the mark line. Normally this is done by
.Xr alarm 2 .
.SH CONFIGURATION FILE SYNTAX DIFFERENCES
.PP
.B Syslogd
uses a slightly different syntax for its configuration file than
the original BSD sources. Originally all messages of a specific priority
and above were forwarded to the log file.
.PP
For example see the following sample file
.IP
## Sample syslog.conf
## Emergency messages (system may be unusable)
.br
*.emerg *
.br
*.alert /dev/log
## High severity errors
.br
*.alert;*.crit /usr/adm/syslog
## every other message (errors/warning and informational)
.br
*.info;*.notice;*.warning;*.err /usr/adm/messages
.br
*.debug /usr/adm/debug
.SH SUPPORT FOR REMOTE LOGGING
.PP
Not implemented.
.SH OUTPUT TO NAMED PIPES (FIFOs)
.PP
Not implemented.
.SH INSTALLATION CONCERNS
.PP
There is probably one important consideration when installing this
version of syslogd. This version of syslogd is dependent on proper
formatting of messages by the syslog function.
.PP
.B Syslogd
should be started by the rc sequence.
.SH DEBUGGING
.PP
When debugging is turned on using
.B "\-d"
option and syslogd is compiled with debug=1 then syslogd
will be very verbose by writing much of what it does on stdout.
Whenever
the configuration file is reread and re-parsed you'll see a tabular,
corresponding to the internal data structure. This tabular consists of
four fields:
.TP
.I number
This field contains a serial number starting by zero. This number
represents the position in the internal data structure (i.e. the
array). If one number is left out then there might be an error in the
corresponding line in
.IR /etc/syslog.conf .
.TP
.I pattern
This field is tricky and represents the internal structure
exactly. Every column stands for a facility (refer to
.BR syslog (3)).
As you can see, there are still some facilities left free for former
use, only the left most are used. Every field in a column represents
the priorities (refer to
.BR syslog (3)).
.TP
.I action
This field describes the particular action that takes place whenever a
message is received that matches the pattern. Refer to the
.BR syslog.conf (5)
manpage for all possible actions.
.TP
.I arguments
This field shows additional arguments to the actions in the last
field. For file-logging this is the filename for the logfile; for
user-logging this is a list of users; for remote logging this is the
hostname of the machine to log to; for console-logging this is the
used console; for tty-logging this is the specified tty; wall has no
additional arguments.
.PP
Note that if syslogd is compiled with debug=0 only a subset is printed.
.SH FILES
.PP
.LR 28 /etc/syslog.conf "Configuration file for syslogd. See
.Xr syslog.conf 5
for exact information.
.LR 28 /dev/log "The log device (console) for Minix.
.LR 28 /usr/run/syslogd.pid "The file containing the process id of syslogd.
.SH BUGS
.PP
If an error occurs in one line the whole rule is ignored.
.B Syslogd
doesn't change the filemode of opened logfiles at any stage of
process. If a file is created it is world readable. If you want to
avoid this, you have to create it and change permissions on your own.
.SH SEE ALSO
.BR syslog.conf (5),
.BR logger (1),
.BR syslog (3).
.\" .BR services (5),