Xref: utzoo comp.unix.admin:2312 comp.unix.questions:32350 comp.unix.misc:1572 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!uunet!mcsun!hp4nl!ncsbv!peter From: peter@ncsbv.UUCP (Peter Jannesen) Newsgroups: comp.unix.admin,comp.unix.questions,comp.unix.misc Subject: Re: ISC - logging kernel messages Keywords: kernel interactive ISC logging message Message-ID: <761@ncsbv.UUCP> Date: 22 Jun 91 11:15:30 GMT References: <7685@cactus.org> Reply-To: peter@ncs.nl (Peter Jannesen) Followup-To: comp.unix.admin Organization: N.C.S.,Rotterdam, the Nederlands Lines: 48 In article <7685@cactus.org> statham@cactus.org (Perry L. Statham) writes: >Does anyone out there in UnixLand know how to get the kernel >of Interactive 386/ix Unix 3.2 to log it's error messages to >a file or pipe? Install Operating System Message in the kernel (using kconfig ADD FACILITY). After you build and rebooted the system there is a new device called /dev/osm. Kernal message sended to the console are also sended to /dev/osm os do a simple 'cat /dev/osm >errorlogfile &' and all messages are going also to errorlogfile. A simple shell script to include in /etc/rc2.d doing this on system boot: #ident "@(#)syslog 1.0 - 91/06/19" LOGFILE=/usr/spool/log/syslog # syslog control case $1 in 'start') set `who -r` if [ $9 = "S" ] then echo System started at: `date` >>$LOGFILE cat /dev/osm >>$LOGFILE & fi ;; 'stop') /bin/ps -ef | grep 'cat /dev/osm' | grep -v grep | while read d1 pid d2 do if [ "${pid}" != "" ] then /bin/kill ${pid} fi done ;; *) echo "usage: /etc/init.d/syslog {start|stop}" ;; esac =============================================================================== Peter Jannesen Network Communication Systems (N.C.S), The Netherlands Phone: +31104130093 Fax: +31104146452 Address: Westbaak 96a Email: peter@ncs.nl 3012 KM Rotterdam, The Netherlands ===============================================================================