Commit | Line | Data |
---|---|---|
60af2e6d KM |
1 | .\" Copyright (c) 1983 Regents of the University of California. |
2 | .\" All rights reserved. The Berkeley software License Agreement | |
3 | .\" specifies the terms and conditions for redistribution. | |
4 | .\" | |
84cb5481 | 5 | .\" @(#)syslogd.8 6.1 (Berkeley) %G% |
60af2e6d KM |
6 | .\" |
7 | .\" @(#)syslog.8 4.2 7/28/83 | |
84cb5481 | 8 | .TH SYSLOG 8 "" |
60af2e6d KM |
9 | .UC 5 |
10 | .SH NAME | |
84cb5481 | 11 | syslogd \- log systems messages |
60af2e6d | 12 | .SH SYNOPSIS |
84cb5481 KM |
13 | .B /etc/syslogd |
14 | [ | |
60af2e6d KM |
15 | .BI \-m N |
16 | ] [ | |
17 | .BI \-f name | |
18 | ] [ | |
19 | .B \-d | |
20 | ] | |
21 | .SH DESCRIPTION | |
84cb5481 | 22 | .I Syslogd |
60af2e6d KM |
23 | reads a datagram socket |
24 | and logs each line it reads into a set of files | |
25 | described by the configuration file | |
26 | /etc/syslog.conf. | |
60af2e6d KM |
27 | Each message is one line. |
28 | A message can contain a priority code, | |
84cb5481 | 29 | marked by a number in angle braces |
60af2e6d KM |
30 | at the beginning of the line. |
31 | Priorities are defined in | |
84cb5481 | 32 | .RI < syslog.h >. |
60af2e6d | 33 | .PP |
84cb5481 KM |
34 | .I Syslogd |
35 | configures when it starts up | |
36 | and whenever it receives a hangup signal. | |
60af2e6d KM |
37 | The configuration file is in two sections |
38 | separated by a blank line. | |
39 | The first section defines files that | |
84cb5481 KM |
40 | .I syslogd |
41 | will log into or host names that | |
42 | .I syslogd | |
43 | will forward messages to. | |
60af2e6d | 44 | Each line contains |
84cb5481 KM |
45 | a set of numbers which define the message priorities |
46 | that this file or host will receive; | |
60af2e6d KM |
47 | an optional asterisk |
48 | which guarantees that something gets output | |
84cb5481 KM |
49 | at least every 15 minutes; |
50 | and a pathname or a hostname prefixed by `@'. | |
60af2e6d | 51 | The second part of the file |
84cb5481 KM |
52 | contains a list of users who will receive messages if logged in. |
53 | Each line contains an optional | |
54 | set of numbers which define the message priorities | |
55 | that this user will receive followed by the user's login name. | |
56 | The default priority level is LOG_SALERT if none is specified. | |
57 | Priority numbers may range from 1 to 31, | |
58 | and may be given in comma-separated lists | |
59 | and/or dash-separated ranges. | |
60 | .PP | |
60af2e6d KM |
61 | For example, the configuration file: |
62 | .nf | |
63 | ||
84cb5481 KM |
64 | 1-5*/dev/console |
65 | 8-9,25/usr/spool/adm/syslog | |
66 | 1-3/usr/adm/critical | |
67 | 1-4@ucbarpa | |
60af2e6d KM |
68 | |
69 | eric | |
70 | kridle | |
84cb5481 | 71 | 1-5,25ralph |
60af2e6d KM |
72 | |
73 | .fi | |
84cb5481 | 74 | logs all messages of priorities 1 through 5 |
60af2e6d | 75 | onto the system console, |
84cb5481 KM |
76 | including timing marks every 15 minutes; |
77 | all messages of priorities 8, 9 or 25 | |
60af2e6d | 78 | into the file /usr/spool/adm/syslog; |
84cb5481 KM |
79 | all messages of priorities 3 or higher |
80 | into /usr/adm/critical and | |
81 | forwards all messages of priorities 4 or higher to ucbarpa. | |
82 | The users ``eric'' and ``kridle'' | |
60af2e6d | 83 | will be informed on any subalert messages. |
84cb5481 KM |
84 | The user ``ralph'' |
85 | will be informed on any message of priorities 5 or higher, | |
86 | and any message of priority 25. | |
60af2e6d KM |
87 | .PP |
88 | The flags are: | |
89 | .TP 0.5i | |
90 | .B \-m | |
91 | Set the mark interval to | |
92 | .I N | |
84cb5481 | 93 | (default 15 minutes). |
60af2e6d KM |
94 | .TP |
95 | .B \-f | |
96 | Specify an alternate configuration file. | |
97 | .TP | |
98 | .B \-d | |
99 | Turn on debugging (if compiled in). | |
100 | .PP | |
84cb5481 KM |
101 | .I Syslogd |
102 | creates the file /etc/syslog.pid, if possible, | |
103 | containing a single line with its process id. | |
104 | This can be used to kill or reconfigure | |
105 | .I syslogd. | |
106 | .PP | |
60af2e6d | 107 | To bring |
84cb5481 | 108 | .I syslogd |
60af2e6d | 109 | down, |
84cb5481 | 110 | it should be sent a terminate signal (e.g. kill `cat /etc/syslog.pid`). |
60af2e6d | 111 | .SH FILES |
84cb5481 KM |
112 | .ta \w'/etc/syslog.conf 'u |
113 | .nf | |
114 | /etc/syslog.conf the configuration file | |
115 | /etc/syslog.pid the process id | |
116 | /dev/log UNIX domain datagram socket to listen to | |
117 | .fi | |
60af2e6d | 118 | .SH BUGS |
84cb5481 KM |
119 | Kernel priorities should only be allowed to privileged programs. |
120 | .SH "SEE ALSO" | |
60af2e6d | 121 | syslog(3) |