[9] | 1 | This is just syslogd and the test programs now. syslog() is in libc 4.2
|
---|
| 2 | syslogd has been changed to use /proc/kmsg for kernel messages. It also
|
---|
| 3 | avoids making any terminal it opens its controlling terminal. Otherwise
|
---|
| 4 | we have a dodgy race condition between processes connecting to terminals
|
---|
| 5 | which can result in the terminal having the wrong group at the wrong time.
|
---|
| 6 | The syslog() in libc 4.2 needs changing to use O_NOCTTY on its opens as
|
---|
| 7 | well.
|
---|
| 8 |
|
---|
| 9 | Mike Jagdis Internet: jaggy@purplet.demon.co.uk
|
---|
| 10 | FidoNet: Mike Jagdis, 2:252/305
|
---|
| 11 |
|
---|
| 12 | ---------------------------------------------------------------------------
|
---|
| 13 |
|
---|
| 14 | Syslogd and Syslog.o
|
---|
| 15 |
|
---|
| 16 | These are the syslogd and syslog ported from 4.3BSD (that's the new one with
|
---|
| 17 | the *very* flexible config file).
|
---|
| 18 |
|
---|
| 19 | Syslogd is essentially unchanged from the 4.3BSD, with the exception that
|
---|
| 20 | *nothing* is ever logged to the console (BAD thing to do on a UNIXpc). You
|
---|
| 21 | can configure it (via /etc/syslog.conf) to log messages in different
|
---|
| 22 | logfiles (depending upon the sender's facility code and the priority), log
|
---|
| 23 | to users' terminals (same dependancies), and if things get real bad, it can
|
---|
| 24 | do a wall (write-all; same dependancies).
|
---|
| 25 |
|
---|
| 26 | Syslog is really only modified in that it uses UDP datagrams because I had
|
---|
| 27 | no luck at all using UNIX domain sockets on the 3B1. See syslog.h for
|
---|
| 28 | facility codes and priorities that can be used.
|
---|
| 29 |
|
---|
| 30 |
|
---|
| 31 | BUGS:
|
---|
| 32 | Messages from facilities LOG_KERN, LOG_USER, and LOG_PRT never can be
|
---|
| 33 | wall-ed, no matter how high the priority. I'm still trying to decide if
|
---|
| 34 | this is a bug or a feature. :-)
|
---|
| 35 |
|
---|
| 36 |
|
---|
| 37 | ALSO INCLUDED:
|
---|
| 38 |
|
---|
| 39 | Syslog_test, sendlog (to use from shell scripts) and logger (for use in
|
---|
| 40 | shell script also).
|
---|
| 41 |
|
---|
| 42 | NEEDED:
|
---|
| 43 |
|
---|
| 44 | The resolver routines in libresolv.a are not needed, but allow you to log to
|
---|
| 45 | hosts not present in /etc/hosts and to accept logging from same.
|
---|
| 46 |
|
---|
| 47 | -----------------------------------------------------------------------
|
---|
| 48 |
|
---|
| 49 | Fixed up UNIX domain socket code, added Linux specific code to read messages
|
---|
| 50 | from the kernel.
|
---|
| 51 |
|
---|
| 52 | The #ifdefs are now :-
|
---|
| 53 |
|
---|
| 54 | SYSLOG_INET listen on a UDP socket (syslogd)
|
---|
| 55 | log via UDP (syslog library call)
|
---|
| 56 |
|
---|
| 57 | SYSLOG_UNIXAF listen on a UNIX domain socker (syslogd)
|
---|
| 58 | log via UNIX domain (syslogd library)
|
---|
| 59 |
|
---|
| 60 | SYSLOG_KERNEL fork a second copy to read kernel messages using
|
---|
| 61 | syslog system call.
|
---|
| 62 |
|
---|
| 63 | syslogd should be built with one or more of these flags, libsyslog.a should
|
---|
| 64 | be built with SYSLOG_INET or SYSLOG_UNIXAF, SYSLOG_INET is used in preference
|
---|
| 65 | to SYSLOG_UNIXAF.
|
---|
| 66 |
|
---|
| 67 | readlog is a program which reads from the kernel and records the messages
|
---|
| 68 | it finds in syslogd via the normal library call interface, it can be run
|
---|
| 69 | instead of building syslogd with SYSLOG_KERNEL.
|
---|