Operating System - Linux
1829107 Members
2265 Online
109986 Solutions
New Discussion

how to redirect all kernel msgs to a separate vc ?

 
SOLVED
Go to solution
Martin Bezemer
New Member

how to redirect all kernel msgs to a separate vc ?

Hello world! ;-)
I would like to have all the kernel messages appear on a separate virtual console. I would like to be able to switch to that console using alt-F12, as I will not run X on the boxes.
I am running mandrake 7.0 and am setting up a http and a mail/news server and I am tired of 'tail -f messages'.
Thanks in advance from another newbie.
Free?! Does that mean I can't get a Discount?!
3 REPLIES 3
Mark Fenton
Esteemed Contributor

Re: how to redirect all kernel msgs to a separate vc ?

Martin,

Don't know why you'd need to use F12 in particular, but check out Bastille -- they log to consoles (one for kernel messages, one for /var/messages)

If you want to poke and prod, look at the config file for syslogd and edit it to go to your console device (on whichever virtual console) in addition to the log file by inserting a line like:

kern.* /dev/tty12

(you need to create the tty first if it doesn't already exist)

hth
Mark
Martin Bezemer
New Member

Re: how to redirect all kernel msgs to a separate vc ?

ok, and where do I activate console /dev/tty12 under key alt-F12 ?
Currently I only have 1 thru 6 under the keys alt-F1 thru alt-F6 resp.
Oh, btw., I have smoothwall on my dedicated firewall machine and with alt-F12 I can quickly view the messages s[t|c]reaming past... I thought it A Good Idea (tm) to have alt-F12 configured to do the same on every box.

Thanks again from the newbie in town...
Free?! Does that mean I can't get a Discount?!
Mark Fenton
Esteemed Contributor
Solution

Re: how to redirect all kernel msgs to a separate vc ?

Martin,

The file /etc/inittab handles setup of tty's,
To add tty12 to your list, just add a line to /etc/inittab to associate f12 with tty12 like so:
12:2345:: /dev/tty12

if you want to offer login as a possibility for this tty, can add the other fields as per the previous entries.

Hope this helps.

Mark