Re: printk, klogd

Joe (morph@morph.bevc.blacksburg.va.us)
6 Jul 1995 15:53:53 GMT


A lot of people have been running around saying all sorts of things
which are mainly a matter of opinion about where certain types of
messages should go. What I do, and some may have thought of this, or
it may have been mentioned here before, but I redirect my syslog type
messages to a higher virtual console, so, besides looking at funny
goings on in the kernel, or having a hacked kernel dump arp packets
with printk, etc., I can also look to see why the disk is randomly
spinning, without even logging in as root (maybe a security hole, but
not many people have access to my console, fewer know this (now
everyone does, whee!)) or typing m /var/adm/messages. And since it was
mentioned earlier (even though someone was complaining about it?)
that switching VCs is done by the KB interrupt handler and can even
happen after a shutdown -h (really I always found this odd) or after a
panic (could be more useful, since even though it may not get it out
to disk, it might make it into the syslog screen VC... or if the FS is
panic unmounted, etc...)

Anyone can figure this out, but here's my /etc/syslog.conf:

# /etc/syslog.conf
# For info about the format of this file, see "man syslog.conf" (the BSD man
# page), and /usr/doc/sysklogd/README.linux.
#
# NOTE: YOU HAVE TO USE TABS HERE - NOT SPACES.
# I don't know why.
#

#####file logs
*.=info;*.=notice /usr/adm/messages
*.=debug /usr/adm/debug
*.warn /usr/adm/syslog

#####tty logs
*.=debug;mail.none /dev/tty15
*.warn;auth.*;mail.none /dev/tty14
mail.* /dev/tty13
*.* /dev/tty16

#
# This might work instead to log on a remote host:
# * @hostname
#end of syslog.conf

And I also change the text color of these VCs during startup, just so
I know that they're something different, but that's just me being
silly.

Anyway, enjoy, happy kernel hacking...

-Joe Augst
morph@morph.bevc.blacksburg.va.us