/usr/adm/unix.log
Kevin O'Gorman
kevin at kosman.UUCP
Wed Sep 21 02:30:05 AEST 1988
In article <10585 at stb.UUCP> michael at stb.UUCP (Michael) writes:
>I just discovered /usr/adm/unix.log
>
>Questions:
>#1. Does the system verify writes to the hard drive?
>#2. How many repeats will the system take before it considers the read to
>fail? (If it takes 10 tries, I won't consider my repeats of 1 to be a problem)
>#3. Why doesn't a surface check find these?
>#4. Is there any way to get these mesages into a more noticable place
>(such as SMRG's message queue?)
Well, here's the shell script I run every night from /usr/lib/crontab. It
saves the log daily, keeping a week's worth, and mails the daily segments
to root, so that you actually see this stuff. It could be made lots better
with some massaging, a la perl, but this at least lets me see what's what.
# /usr/local/bin/trimlog
# if this is run once per day, it will save the last
# weeks worth of hardware error-log files. You can, of course, comment
# out some of the lines to save less
cd /usr/adm
mv ulog.5 ulog.6
mv ulog.4 ulog.5
mv ulog.3 ulog.4
mv ulog.2 ulog.3
mv ulog.1 ulog.2
mv ulog.0 ulog.1
mv unix.log ulog.0
cp /dev/null unix.log
if [ -s ulog.0 ]
then
(echo "Contents of unix.log:"; cat ulog.0) | /bin/mail -t root
fi
> Michael
>p.s. If the system doesn't verify writes (to both floppy and hard), how can
>we/I make it verify them?
>: ---
>: Michael Gersten uunet.uu.net!denwa!stb!michael
>: sdcsvax!crash!gryphon!denwa!stb!michael
>: Coff Coff <=== Stop smoking.
More information about the Unix-pc.general
mailing list