Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

logger(1)

syslog(3)

syslog.conf(4)

log(7)

syslogd(1M)  —  ADMINISTRATOR COMMANDS

NAME

syslogd − log system messages

SYNOPSIS

/usr/sbin/syslogd [ −d ] [ −fconfigfile ] [ −m interval ]

DESCRIPTION

syslogd reads and forwards system messages to the appropriate log files and/or users, depending upon the priority of a message and the system facility from which it originates.  The configuration file /etc/syslog.conf [see syslog.conf(4)] controls where messages are forwarded.  syslogd logs a mark (timestamp) message every interval minutes (default 20) at priority LOG_INFO to the facility whose name is given as mark in the syslog.conf file. 

A system message consists of a single line of text, which may be prefixed with a priority code number enclosed in angle-brackets (<>); priorities are defined in sys/syslog.h. 

syslogd reads from the STREAMS log driver, /dev/log, from any transport provider specified in /etc/netconfig, /etc/net/transport/hosts, and /etc/net/transport/services, and from the special device /dev/log (for kernel messages). 

syslogd reads the configuration file when it starts up, and again whenever it receives a HUP signal, at which time it also closes all files it has open, re-reads its configuration file, and then opens only the log files that are listed in that file.  syslogd exits when it receives a TERM signal. 

As it starts up, syslogd creates the file /etc/syslog.pid, if possible, containing its process ID (PID). 

Lines in the configuration file have a selector to determine the message priorities to which the line applies and an action .  The action field are separated from the selector by one or more tabs. 

Selectors are semicolon separated lists of priority specifiers.  Each priority has a facility describing the part of the system that generated the message, a dot, and a level indicating the severity of the message.  Symbolic names may be used.  An asterisk selects all facilities.  All messages of the specified level or higher (greater severity) are selected.  More than one facility may be selected using commas to separate them.  For example:

∗.emerg;mail,daemon.crit

Selects all facilities at the emerg level and the mail and daemon facilities at the crit level. 

Known facilities and levels recognized by syslogd are those listed in syslog(3) without the leading “LOG_”.  The additional facility “mark” has a message at priority LOG_INFO sent to it every 20 minutes (this may be changed with the −m flag).  The “mark” facility is not enabled by a facility field containing an asterisk.  The level “none” may be used to disable a particular facility.  For example,

∗.debug;mail.none

Sends all messages except mail messages to the selected file. 

The second part of each line describes where the message is to be logged if this line is selected.  There are four forms:

•A filename (beginning with a leading slash).  The file will be opened in append mode. 

•A hostname preceeded by an at sign (“@”).  Selected messages are forwarded to the syslogd on the named host. 

•A comma separated list of users.  Selected messages are written to those users if they are logged in. 

•An asterisk.  Selected messages are written to all logged-in users. 

Blank lines and lines beginning with ‘#’ are ignored. 

For example, the configuration file:

    kern,mark.debug /dev/console
    ∗.notice;mail.info  /usr/spool/adm/syslog
    ∗.crit  /usr/adm/critical
    kern.err    @laidbak
    ∗.emerg ∗
    ∗.alert wmv, stevea
    ∗.alert;auth.warning    maf

logs all kernel messages and 20 minute marks onto the system console, all notice (or higher) level messages and all mail system messages except debug messages into the file /usr/spool/adm/syslog, and all critical messages into /usr/adm/critical; kernel messages of error severity or higher are forwarded to ucbarpa.  All users will be informed of any emergency messages, the users “wmv” and “stevea” will be informed of any alert messages, and the user “maf” will be informed of any alert message, or any warning message (or higher) from the authorization system. 

The following options are available:

−d Turn on debugging. 

−fconfigfile Specify an alternate configuration file. 

−m interval Specify an interval, in minutes, between mark messages. 

FILES

/etc/syslog.conf configuration file

/etc/syslog.pid process ID

/dev/log STREAMS log driver

/etc/netconfig specifies the transport providers available on the system

/etc/net/transport/hosts
network hosts for each transport

/etc/net/transport/services
network services for each transport

SEE ALSO

logger(1), syslog(3), syslog.conf(4), log(7). 

  —  BSD Compatibility Package

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026