Path: utzoo!utgpu!watmath!uunet!lll-winken!killer!osu-cis!n8emr!uncle!jbm From: jbm@uncle.UUCP (John B. Milton) Newsgroups: unix-pc.general Subject: Re: Error logging to /usr/adm/unix.log ceased?! Keywords: errors, logfile, /usr/adm/unix.log Message-ID: <448@uncle.UUCP> Date: 22 Dec 88 07:05:48 GMT References: <557@icus.islp.ny.us> Reply-To: jbm@uncle.UUCP (John B. Milton) Distribution: unix-pc Organization: U.N.C.L.E. Lines: 40 In article <557@icus.islp.ny.us> lenny@icus.islp.ny.us (Lenny Tropiano) writes: >Did I do something wrong?! Of course! :) [ no errors in /usr/adm/unix.log ] >I'm concerned that something is screwed up. Maybe it's because I'm >running UNIX3.51c, maybe not. Is there a way to start things fresh, ^ `--SINCE WHEN?!!! At least as far as the 3.51 smgr goes, whenever a log file gets over 10k, the smgr re-opens with O_CREAT, so if you get lots of errors, you'll lose them whenever the log file gets too big. I do this from cron every night: cd /usr/adm if [ -f unix.log ]; then cat unix.log >> UNIXLOG rm unix.log fi Another thing some people might miss here: Whenever the kernel want to send messages to the outside world, it uses a kernel routine eprintf(). This writes a line of text to /dev/error. While the smgr is sitting around doing nothing, it has a read hanging on /dev/error. Certain line formats will do different things when smgr reads the line: echo "#This will go to /usr/adm/unix.log" > /dev/error ^ `-- This tells smgr that this is an error to be logged. echo "This will go to the [!!] icon" > /dev/error There are other formats to get to the [!], fuel gauge, mail, and calendar icons. There are also some MAJOR security holes here, if you know the right format line to write to /dev/error. Several things will break if you write protect /dev/error, so that's not a good solution. I was thinking of posting a complete doc on all the strings you can send to smgr through /dev/error, but now I don't know if I should until a patch to smgr can be developed. Any thoughts? John -- John Bly Milton IV, jbm@uncle.UUCP, n8emr!uncle!jbm@osu-cis.cis.ohio-state.edu (614) h:294-4823, w:764-2933; Got any good 74LS503 circuits?