Error logging to /usr/adm/unix.log ceased?!

John B. Milton jbm at uncle.UUCP
Thu Dec 22 17:05:48 AEST 1988


In article <557 at icus.islp.ny.us> lenny at 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 at uncle.UUCP, n8emr!uncle!jbm at osu-cis.cis.ohio-state.edu
(614) h:294-4823, w:764-2933;  Got any good 74LS503 circuits?



More information about the Unix-pc.general mailing list