| 1 | .\" Copyright (c) 1983, 1986 The Regents of the University of California. |
| 2 | .\" All rights reserved. |
| 3 | .\" |
| 4 | .\" Redistribution and use in source and binary forms are permitted |
| 5 | .\" provided that the above copyright notice and this paragraph are |
| 6 | .\" duplicated in all such forms and that any documentation, |
| 7 | .\" advertising materials, and other materials related to such |
| 8 | .\" distribution and use acknowledge that the software was developed |
| 9 | .\" by the University of California, Berkeley. The name of the |
| 10 | .\" University may not be used to endorse or promote products derived |
| 11 | .\" from this software without specific prior written permission. |
| 12 | .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR |
| 13 | .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED |
| 14 | .\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
| 15 | .\" |
| 16 | .\" @(#)syslogd.8 6.6 (Berkeley) %G% |
| 17 | .\" |
| 18 | .TH SYSLOGD 8 "" |
| 19 | .UC 5 |
| 20 | .SH NAME |
| 21 | syslogd \- log systems messages |
| 22 | .SH SYNOPSIS |
| 23 | .B /etc/syslogd |
| 24 | [ |
| 25 | .BI \-f configfile |
| 26 | ] [ |
| 27 | .BI \-m markinterval |
| 28 | ] [ |
| 29 | .B \-d |
| 30 | ] |
| 31 | .SH DESCRIPTION |
| 32 | .I Syslogd |
| 33 | reads and logs messages into a set of files |
| 34 | described by the configuration file |
| 35 | /etc/syslog.conf. |
| 36 | Each message is one line. |
| 37 | A message can contain a priority code, |
| 38 | marked by a number in angle braces |
| 39 | at the beginning of the line. |
| 40 | Priorities are defined in |
| 41 | .RI < sys/syslog.h >. |
| 42 | .I Syslogd |
| 43 | reads from the UNIX domain socket |
| 44 | .IR /dev/log , |
| 45 | from an Internet domain socket specified in |
| 46 | .IR /etc/services , |
| 47 | and from the special device |
| 48 | .I /dev/klog |
| 49 | (to read kernel messages). |
| 50 | .PP |
| 51 | .I Syslogd |
| 52 | configures when it starts up |
| 53 | and whenever it receives a hangup signal. |
| 54 | Lines in the configuration file have a |
| 55 | .I selector |
| 56 | to determine the message priorities to which the line applies |
| 57 | and an |
| 58 | .IR action . |
| 59 | The |
| 60 | .I action |
| 61 | field are separated from the selector by one or more tabs. |
| 62 | .PP |
| 63 | Selectors are semicolon separated lists of priority specifiers. |
| 64 | Each priority has a |
| 65 | .I facility |
| 66 | describing the part of the system that generated the message, |
| 67 | a dot, |
| 68 | and a |
| 69 | .I level |
| 70 | indicating the severity of the message. |
| 71 | Symbolic names may be used. |
| 72 | An asterisk selects all facilities. |
| 73 | All messages of the specified level or higher (greater severity) |
| 74 | are selected. |
| 75 | More than one facility may be selected using commas to separate them. |
| 76 | For example: |
| 77 | .PP |
| 78 | .ti +5 |
| 79 | *.emerg;mail,daemon.crit |
| 80 | .PP |
| 81 | Selects all facilities at the |
| 82 | .I emerg |
| 83 | level and the |
| 84 | .I mail |
| 85 | and |
| 86 | .I daemon |
| 87 | facilities at the |
| 88 | .I crit |
| 89 | level. |
| 90 | .PP |
| 91 | Known facilities and levels |
| 92 | recognized by |
| 93 | .I syslogd |
| 94 | are those listed in |
| 95 | .IR syslog (3) |
| 96 | without the leading ``LOG_''. |
| 97 | The additional facility |
| 98 | ``mark'' has a message at priority LOG_INFO sent to it every |
| 99 | 20 minutes |
| 100 | (this may be changed with the |
| 101 | .B \-m |
| 102 | flag). |
| 103 | The ``mark'' facility is not enabled by a facility field containing an asterisk. |
| 104 | The level ``none'' may be used to disable a particular facility. |
| 105 | For example, |
| 106 | .PP |
| 107 | .ti +5 |
| 108 | *.debug;mail.none |
| 109 | .PP |
| 110 | Sends all messages |
| 111 | .I except |
| 112 | mail messages to the selected file. |
| 113 | .PP |
| 114 | The second part of each line describes where the message is to be logged |
| 115 | if this line is selected. |
| 116 | There are four forms: |
| 117 | .IP \(bu 3n |
| 118 | A filename (beginning with a leading slash). |
| 119 | The file will be opened in append mode. |
| 120 | .IP \(bu 3n |
| 121 | A hostname preceeded by an at sign (``@''). |
| 122 | Selected messages are forwarded to the |
| 123 | .I syslogd |
| 124 | on the named host. |
| 125 | .IP \(bu 3n |
| 126 | A comma separated list of users. |
| 127 | Selected messages are written to those users |
| 128 | if they are logged in. |
| 129 | .IP \(bu 3n |
| 130 | An asterisk. |
| 131 | Selected messages are written to all logged-in users. |
| 132 | .PP |
| 133 | Blank lines and lines beginning with `#' are ignored. |
| 134 | .PP |
| 135 | For example, the configuration file: |
| 136 | .PP |
| 137 | .nf |
| 138 | .ta 4m +\w'*.alert,auth.warning'u+3 |
| 139 | kern,mark.debug /dev/console |
| 140 | *.notice;mail.info /usr/spool/adm/syslog |
| 141 | *.crit /usr/adm/critical |
| 142 | kern.err @ucbarpa |
| 143 | *.emerg * |
| 144 | *.alert eric,kridle |
| 145 | *.alert;auth.warning ralph |
| 146 | .fi |
| 147 | .PP |
| 148 | logs all kernel messages |
| 149 | and 20 minute marks onto the system console, |
| 150 | all notice (or higher) level messages and all mail system messages |
| 151 | except debug messages |
| 152 | into the file /usr/spool/adm/syslog, |
| 153 | and all critical messages |
| 154 | into /usr/adm/critical; |
| 155 | kernel messages of error severity or higher are forwarded |
| 156 | to ucbarpa. |
| 157 | All users will be informed of any emergency messages, |
| 158 | the users ``eric'' and ``kridle'' |
| 159 | will be informed of any alert messages, |
| 160 | and the user ``ralph'' |
| 161 | will be informed of any alert message, |
| 162 | or any warning message (or higher) |
| 163 | from the authorization system. |
| 164 | .PP |
| 165 | The flags are: |
| 166 | .TP 0.5i |
| 167 | .B \-f |
| 168 | Specify an alternate configuration file. |
| 169 | .TP |
| 170 | .B \-m |
| 171 | Select the number of minutes between mark messages. |
| 172 | .TP |
| 173 | .B \-d |
| 174 | Turn on debugging. |
| 175 | .PP |
| 176 | .I Syslogd |
| 177 | creates the file /etc/syslog.pid, if possible, |
| 178 | containing a single line with its process id. |
| 179 | This can be used to kill or reconfigure |
| 180 | .I syslogd. |
| 181 | .PP |
| 182 | To bring |
| 183 | .I syslogd |
| 184 | down, |
| 185 | it should be sent a terminate signal (e.g. kill \`cat /etc/syslog.pid\`). |
| 186 | .SH FILES |
| 187 | .ta \w'/etc/syslog.conf 'u |
| 188 | .nf |
| 189 | /etc/syslog.conf the configuration file |
| 190 | /etc/syslog.pid the process id |
| 191 | /dev/log Name of the UNIX domain datagram log socket |
| 192 | /dev/klog The kernel log device |
| 193 | .fi |
| 194 | .SH SEE ALSO |
| 195 | logger(1), syslog(3) |