[9] | 1 | .\" Copyright 1994 Dr. Greg Wettstein, Enjellic Systems Development.
|
---|
| 2 | .\" May be distributed under the GNU General Public License
|
---|
| 3 | .\" Sun Aug 30 11:35:55 MET: Martin Schulze: Updates
|
---|
| 4 | .\"
|
---|
| 5 | .\" from SYSKLOGD 8 "13 December 1995" "Version 1.3" "Linux System Administration"
|
---|
| 6 | .\" Modified for Minix porting by G. Falzoni <gfalzoni@inwind.it>
|
---|
| 7 | .\" $Id: syslogd.8,v 1.1 2006/04/03 14:59:51 beng Exp $
|
---|
| 8 | .\"
|
---|
| 9 | .\" Local macros
|
---|
| 10 | .de Xr
|
---|
| 11 | .BR \\$1 (\\$2)\\$3
|
---|
| 12 | ..
|
---|
| 13 | .de LB
|
---|
| 14 | .TP \\$1
|
---|
| 15 | \\fB\\$2\\fR
|
---|
| 16 | \\$3
|
---|
| 17 | ..
|
---|
| 18 | .de LI
|
---|
| 19 | .TP \\$1
|
---|
| 20 | \\fI\\$2\\fR
|
---|
| 21 | \\$3
|
---|
| 22 | ..
|
---|
| 23 | .de LR
|
---|
| 24 | .TP \\$1
|
---|
| 25 | \\fR\\$2\\fR
|
---|
| 26 | \\$3
|
---|
| 27 | ..
|
---|
| 28 | .\" end local macros
|
---|
| 29 | .TH SYSLOGD 8 "Jan. 23, 2000"
|
---|
| 30 | .SH NAME
|
---|
| 31 | .PP
|
---|
| 32 | syslogd \- system logging daemon.
|
---|
| 33 | .SH SYNOPSIS
|
---|
| 34 | .PP
|
---|
| 35 | .B syslogd
|
---|
| 36 | .RB [ " \-d " ]
|
---|
| 37 | .RB [ " \-f "
|
---|
| 38 | .I config file
|
---|
| 39 | ]
|
---|
| 40 | .RB [ " \-m "
|
---|
| 41 | .I interval
|
---|
| 42 | ]
|
---|
| 43 | .RB [ " \-p"
|
---|
| 44 | .IB port
|
---|
| 45 | ]
|
---|
| 46 | .RB [ " \-v " ]
|
---|
| 47 | .LP
|
---|
| 48 | .SH DESCRIPTION
|
---|
| 49 | .PP
|
---|
| 50 | System logging is provided by a version of
|
---|
| 51 | .BR syslogd (8)
|
---|
| 52 | derived from the
|
---|
| 53 | stock BSD sources.
|
---|
| 54 | .B Syslogd
|
---|
| 55 | provides the kind of logging that many modern programs use. Every logged
|
---|
| 56 | message contains at least a time, a hostname field and a
|
---|
| 57 | program name field, but that depends on how trusty the logging
|
---|
| 58 | program is.
|
---|
| 59 | .PP
|
---|
| 60 | While the syslogd sources have been heavily modified a couple of notes
|
---|
| 61 | are necessary. First of all there has been a systematic attempt to
|
---|
| 62 | insure that syslogd follows the default, standard BSD behavior.
|
---|
| 63 | The second important concept to note is that this version of syslogd
|
---|
| 64 | interacts transparently with the version of syslog found in the
|
---|
| 65 | standard libraries, so you must insure that the correct versions are installed.
|
---|
| 66 | .PP
|
---|
| 67 | The main configuration file
|
---|
| 68 | .I /etc/syslog.conf
|
---|
| 69 | or an alternative file, given with the
|
---|
| 70 | .B "\-f"
|
---|
| 71 | option, is read at startup. Any line that begins with the hash mark
|
---|
| 72 | (``#'') and empty lines are ignored. If an error occurs during parsing
|
---|
| 73 | the whole line is ignored.
|
---|
| 74 | .SH OPTIONS
|
---|
| 75 | .PP
|
---|
| 76 | .LB 9 "-d" "Turns on debug mode.
|
---|
| 77 | When using debug mode, the daemon will not proceed to
|
---|
| 78 | .BR fork (2)
|
---|
| 79 | to set itself in the background, but will stay in the
|
---|
| 80 | foreground and write much debug information on the current tty. See the
|
---|
| 81 | DEBUGGING section for more information.
|
---|
| 82 | .LB 9 "\-f config file" "Specify an alternative configuration file instead of
|
---|
| 83 | .IR /etc/syslog.conf ","
|
---|
| 84 | which is the default.
|
---|
| 85 | .LB 9 "\-m interval" "The syslogd logs a mark timestamp regularly. The default
|
---|
| 86 | .I interval
|
---|
| 87 | between two
|
---|
| 88 | .I \-\- MARK \-\-
|
---|
| 89 | lines is 20 minutes. This can be changed with this option.
|
---|
| 90 | .LB 9 "\-p port" "You can specify an alternative port instead of
|
---|
| 91 | .I syslog/udp
|
---|
| 92 | default service.
|
---|
| 93 | .LB 9 "\-v" "Print version and exit.
|
---|
| 94 | .SH SIGNALS
|
---|
| 95 | .PP
|
---|
| 96 | .B Syslogd
|
---|
| 97 | reacts to a set of signals. You may easily send a signal to it
|
---|
| 98 | using the following:
|
---|
| 99 | .IP
|
---|
| 100 | kill -SIGNAL `cat /usr/run/syslogd.pid`
|
---|
| 101 | .LB 9 SIGHUP "This lets syslogd perform a re-initialization.
|
---|
| 102 | All open files are closed, the configuration file (default
|
---|
| 103 | is '/etc/syslog.conf') will be reread.
|
---|
| 104 | .LB 9 SIGTERM "The syslogd will die.
|
---|
| 105 | .LB 9 "SIGINT SIGQUIT" "If debugging is enabled these are ignored, otherwise
|
---|
| 106 | syslogd will die.
|
---|
| 107 | .LB 9 SIGALRM "Every time syslogd receives this signal it will log
|
---|
| 108 | the mark line. Normally this is done by
|
---|
| 109 | .Xr alarm 2 .
|
---|
| 110 | .SH CONFIGURATION FILE SYNTAX DIFFERENCES
|
---|
| 111 | .PP
|
---|
| 112 | .B Syslogd
|
---|
| 113 | uses a slightly different syntax for its configuration file than
|
---|
| 114 | the original BSD sources. Originally all messages of a specific priority
|
---|
| 115 | and above were forwarded to the log file.
|
---|
| 116 | .PP
|
---|
| 117 | For example see the following sample file
|
---|
| 118 | .IP
|
---|
| 119 | ## Sample syslog.conf
|
---|
| 120 |
|
---|
| 121 | ## Emergency messages (system may be unusable)
|
---|
| 122 | .br
|
---|
| 123 | *.emerg *
|
---|
| 124 | .br
|
---|
| 125 | *.alert /dev/log
|
---|
| 126 |
|
---|
| 127 | ## High severity errors
|
---|
| 128 | .br
|
---|
| 129 | *.alert;*.crit /usr/adm/syslog
|
---|
| 130 |
|
---|
| 131 | ## every other message (errors/warning and informational)
|
---|
| 132 | .br
|
---|
| 133 | *.info;*.notice;*.warning;*.err /usr/adm/messages
|
---|
| 134 | .br
|
---|
| 135 | *.debug /usr/adm/debug
|
---|
| 136 |
|
---|
| 137 | .SH SUPPORT FOR REMOTE LOGGING
|
---|
| 138 | .PP
|
---|
| 139 | Not implemented.
|
---|
| 140 | .SH OUTPUT TO NAMED PIPES (FIFOs)
|
---|
| 141 | .PP
|
---|
| 142 | Not implemented.
|
---|
| 143 | .SH INSTALLATION CONCERNS
|
---|
| 144 | .PP
|
---|
| 145 | There is probably one important consideration when installing this
|
---|
| 146 | version of syslogd. This version of syslogd is dependent on proper
|
---|
| 147 | formatting of messages by the syslog function.
|
---|
| 148 | .PP
|
---|
| 149 | .B Syslogd
|
---|
| 150 | should be started by the rc sequence.
|
---|
| 151 | .SH DEBUGGING
|
---|
| 152 | .PP
|
---|
| 153 | When debugging is turned on using
|
---|
| 154 | .B "\-d"
|
---|
| 155 | option and syslogd is compiled with debug=1 then syslogd
|
---|
| 156 | will be very verbose by writing much of what it does on stdout.
|
---|
| 157 | Whenever
|
---|
| 158 | the configuration file is reread and re-parsed you'll see a tabular,
|
---|
| 159 | corresponding to the internal data structure. This tabular consists of
|
---|
| 160 | four fields:
|
---|
| 161 | .TP
|
---|
| 162 | .I number
|
---|
| 163 | This field contains a serial number starting by zero. This number
|
---|
| 164 | represents the position in the internal data structure (i.e. the
|
---|
| 165 | array). If one number is left out then there might be an error in the
|
---|
| 166 | corresponding line in
|
---|
| 167 | .IR /etc/syslog.conf .
|
---|
| 168 | .TP
|
---|
| 169 | .I pattern
|
---|
| 170 | This field is tricky and represents the internal structure
|
---|
| 171 | exactly. Every column stands for a facility (refer to
|
---|
| 172 | .BR syslog (3)).
|
---|
| 173 | As you can see, there are still some facilities left free for former
|
---|
| 174 | use, only the left most are used. Every field in a column represents
|
---|
| 175 | the priorities (refer to
|
---|
| 176 | .BR syslog (3)).
|
---|
| 177 | .TP
|
---|
| 178 | .I action
|
---|
| 179 | This field describes the particular action that takes place whenever a
|
---|
| 180 | message is received that matches the pattern. Refer to the
|
---|
| 181 | .BR syslog.conf (5)
|
---|
| 182 | manpage for all possible actions.
|
---|
| 183 | .TP
|
---|
| 184 | .I arguments
|
---|
| 185 | This field shows additional arguments to the actions in the last
|
---|
| 186 | field. For file-logging this is the filename for the logfile; for
|
---|
| 187 | user-logging this is a list of users; for remote logging this is the
|
---|
| 188 | hostname of the machine to log to; for console-logging this is the
|
---|
| 189 | used console; for tty-logging this is the specified tty; wall has no
|
---|
| 190 | additional arguments.
|
---|
| 191 | .PP
|
---|
| 192 | Note that if syslogd is compiled with debug=0 only a subset is printed.
|
---|
| 193 | .SH FILES
|
---|
| 194 | .PP
|
---|
| 195 | .LR 28 /etc/syslog.conf "Configuration file for syslogd. See
|
---|
| 196 | .Xr syslog.conf 5
|
---|
| 197 | for exact information.
|
---|
| 198 | .LR 28 /dev/log "The log device (console) for Minix.
|
---|
| 199 | .LR 28 /usr/run/syslogd.pid "The file containing the process id of syslogd.
|
---|
| 200 | .SH BUGS
|
---|
| 201 | .PP
|
---|
| 202 | If an error occurs in one line the whole rule is ignored.
|
---|
| 203 | .B Syslogd
|
---|
| 204 | doesn't change the filemode of opened logfiles at any stage of
|
---|
| 205 | process. If a file is created it is world readable. If you want to
|
---|
| 206 | avoid this, you have to create it and change permissions on your own.
|
---|
| 207 | .SH SEE ALSO
|
---|
| 208 | .BR syslog.conf (5),
|
---|
| 209 | .BR logger (1),
|
---|
| 210 | .BR syslog (3).
|
---|
| 211 | .\" .BR services (5),
|
---|