install correct aliases file
[unix-history] / usr / src / usr.sbin / syslogd / syslogd.8
index 80ec7d5..7cb04f6 100644 (file)
-.\" Copyright (c) 1983 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
+.\" Copyright (c) 1983, 1986 The Regents of the University of California.
+.\" All rights reserved.
 .\"
 .\"
-.\"    @(#)syslogd.8   5.1 (Berkeley) %G%
+.\" Redistribution and use in source and binary forms are permitted
+.\" provided that the above copyright notice and this paragraph are
+.\" duplicated in all such forms and that any documentation,
+.\" advertising materials, and other materials related to such
+.\" distribution and use acknowledge that the software was developed
+.\" by the University of California, Berkeley.  The name of the
+.\" University may not be used to endorse or promote products derived
+.\" from this software without specific prior written permission.
+.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+.\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
 .\"
-.\"    @(#)syslog.8    4.2             7/28/83
-.TH SYSLOG 8 "7/28/83"
+.\"    @(#)syslogd.8   6.6 (Berkeley) %G%
+.\"
+.TH SYSLOGD 8 ""
 .UC 5
 .SH NAME
 .UC 5
 .SH NAME
-syslog \- log systems messages
+syslogd \- log systems messages
 .SH SYNOPSIS
 .SH SYNOPSIS
-/etc/syslog [
-.BI \-m N
+.B /etc/syslogd
+[
+.BI \-f configfile
 ] [
 ] [
-.BI \-f name
+.BI \-m markinterval
 ] [
 .B \-d
 ]
 .SH DESCRIPTION
 ] [
 .B \-d
 ]
 .SH DESCRIPTION
-.I Syslog
-reads a datagram socket
-and logs each line it reads into a set of files
+.I Syslogd
+reads and logs messages into a set of files
 described by the configuration file
 /etc/syslog.conf.
 described by the configuration file
 /etc/syslog.conf.
-.I Syslog
-configures when it starts up
-and whenever it receives a hangup signal.
-.PP
 Each message is one line.
 A message can contain a priority code,
 Each message is one line.
 A message can contain a priority code,
-marked by a digit in angle braces
+marked by a number in angle braces
 at the beginning of the line.
 Priorities are defined in
 at the beginning of the line.
 Priorities are defined in
-.RI < syslog.h >,
-as follows:
-.IP LOG_ALERT \w'LOG_WARNING'u+2n
-this priority should essentially never
-be used.  It applies only to messages that
-are so important that every user should be
-aware of them, e.g., a serious hardware failure.
-.IP LOG_SALERT
-messages of this priority should be
-issued only when immediate attention is needed
-by a qualified system person, e.g., when some
-valuable system resource dissappears.  They get
-sent to a list of system people.
-.IP LOG_EMERG
-Emergency messages are not sent to users,
-but represent major conditions.  An example
-might be hard disk failures.  These could be
-logged in a separate file so that critical
-conditions could be easily scanned.
-.IP LOG_ERR
-these represent error conditions, such as soft
-disk failures, etc.
-.IP LOG_CRIT
-such messages contain critical information,
-but which can not be classed as errors, for example,
-`su' attempts.
-Messages of this priority and higher
-are typically logged on the system console.
-.IP LOG_WARNING
-issued when an abnormal condition has been
-detected, but recovery can take place.
-.IP LOG_NOTICE
-something that falls in the class of
-``important information''; this class is informational
-but important enough that you don't want to throw
-it away casually.
-Messages without any priority assigned to them
-are typically mapped into this priority.
-.IP LOG_INFO
-information level messages.  These messages
-could be thrown away without problems, but should
-be included if you want to keep a close watch on
-your system.
-.IP LOG_DEBUG
-it may be useful to log certain debugging
-information.  Normally this will be thrown away.
+.RI < sys/syslog.h >.
+.I Syslogd
+reads from the UNIX domain socket
+.IR /dev/log ,
+from an Internet domain socket specified in
+.IR /etc/services ,
+and from the special device
+.I /dev/klog
+(to read kernel messages).
+.PP
+.I Syslogd
+configures when it starts up
+and whenever it receives a hangup signal.
+Lines in the configuration file have a
+.I selector
+to determine the message priorities to which the line applies
+and an
+.IR action .
+The
+.I action
+field are separated from the selector by one or more tabs.
+.PP
+Selectors are semicolon separated lists of priority specifiers.
+Each priority has a
+.I facility
+describing the part of the system that generated the message,
+a dot,
+and a
+.I 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:
+.PP
+.ti +5
+*.emerg;mail,daemon.crit
+.PP
+Selects all facilities at the
+.I emerg
+level and the
+.I mail
+and
+.I daemon
+facilities at the
+.I crit
+level.
+.PP
+Known facilities and levels
+recognized by
+.I syslogd
+are those listed in
+.IR 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
+.B \-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,
+.PP
+.ti +5
+*.debug;mail.none
+.PP
+Sends all messages
+.I except
+mail messages to the selected file.
+.PP
+The second part of each line describes where the message is to be logged
+if this line is selected.
+There are four forms:
+.IP \(bu 3n
+A filename (beginning with a leading slash).
+The file will be opened in append mode.
+.IP \(bu 3n
+A hostname preceeded by an at sign (``@'').
+Selected messages are forwarded to the
+.I syslogd
+on the named host.
+.IP \(bu 3n
+A comma separated list of users.
+Selected messages are written to those users
+if they are logged in.
+.IP \(bu 3n
+An asterisk.
+Selected messages are written to all logged-in users.
 .PP
 .PP
-It is expected that the kernel will not log anything below
-LOG_ERR priority.
+Blank lines and lines beginning with `#' are ignored.
 .PP
 .PP
-The configuration file is in two sections
-separated by a blank line.
-The first section defines files that
-.I syslog
-will log into.
-Each line contains
-a single digit which defines the lowest priority
-(highest numbered priority)
-that this file will receive,
-an optional asterisk
-which guarantees that something gets output
-at least every 20 minutes,
-and a pathname.
-The second part of the file
-contains a list of users that will be
-informed on SALERT level messages.
 For example, the configuration file:
 For example, the configuration file:
+.PP
 .nf
 .nf
-
-       5*/dev/console
-       8/usr/spool/adm/syslog
-       3/usr/adm/critical
-
-       eric
-       kridle
-       kalash
-
+.ta 4m +\w'*.alert,auth.warning'u+3
+       kern,mark.debug /dev/console
+       *.notice;mail.info      /usr/spool/adm/syslog
+       *.crit  /usr/adm/critical
+       kern.err        @ucbarpa
+       *.emerg *
+       *.alert eric,kridle
+       *.alert;auth.warning    ralph
 .fi
 .fi
-logs all messages of priority 5 or higher
-onto the system console,
-including timing marks every 20 minutes;
-all messages of priority 8 or higher
-into the file /usr/spool/adm/syslog;
-and all messages of priority 3 or higher
-into /usr/adm/critical.
-The users ``eric'', ``kridle'', and ``kalash''
-will be informed on any subalert messages.
+.PP
+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 ``eric'' and ``kridle''
+will be informed of any alert messages,
+and the user ``ralph''
+will be informed of any alert message,
+or any warning message (or higher)
+from the authorization system.
 .PP
 The flags are:
 .TP 0.5i
 .PP
 The flags are:
 .TP 0.5i
-.B \-m
-Set the mark interval to
-.I N
-(default 20 minutes).
-.TP
 .B \-f
 Specify an alternate configuration file.
 .TP
 .B \-f
 Specify an alternate configuration file.
 .TP
+.B \-m
+Select the number of minutes between mark messages.
+.TP
 .B \-d
 .B \-d
-Turn on debugging (if compiled in).
+Turn on debugging.
+.PP
+.I Syslogd
+creates the file /etc/syslog.pid, if possible,
+containing a single line with its process id.
+This can be used to kill or reconfigure
+.I syslogd.
 .PP
 To bring
 .PP
 To bring
-.I syslog
+.I syslogd
 down,
 down,
-it should be sent a terminate signal.
-It logs that it is going down
-and then waits approximately 30 seconds
-for any additional messages to come in.
-.PP
-There are some special messages that cause control functions.
-``<*>N'' sets the default message priority to
-.I N.
-``<$>'' causes
-.I syslog
-to reconfigure
-(equivalent to a hangup signal).
-This can be used in a shell file run automatically
-early in the morning to truncate the log.
-.PP
-.I Syslog
-creates the file
-/etc/syslog.pid
-if possible
-containing a single line
-with its process id.
-This can be used to kill or reconfigure
-.I syslog.
-.\".PP
-.\".I Syslog
-.\"can also be compiled to use
-.\".IR mpx (2)
-.\"files instead of datagrams
-.\"if you are running V7.
-.\"In this case it creates and reads the file
-.\"/dev/log.
+it should be sent a terminate signal (e.g. kill \`cat /etc/syslog.pid\`).
 .SH FILES
 .SH FILES
-/etc/syslog.conf \- the configuration file
-.br
-/etc/syslog.pid \- the process id
-.\".br
-.\"/dev/log \- under V7, the mpx file
-.SH BUGS
-LOG_ALERT and LOG_SUBALERT messages
-should only be allowed to privileged programs.
-.PP
-Actually,
-.I syslog
-is not clever enough to deal with kernel error messages
-in the current implementation.
-.SH SEE\ ALSO
-syslog(3)
+.ta \w'/etc/syslog.conf    'u
+.nf
+/etc/syslog.conf       the configuration file
+/etc/syslog.pid        the process id
+/dev/log       Name of the UNIX domain datagram log socket
+/dev/klog      The kernel log device
+.fi
+.SH SEE ALSO
+logger(1), syslog(3)