Somewhere in the past, I saw a linux box with real time dmesg terminal - i.e. you push Ctrl-Alt-F12 and a terminal with with fresh dmesg output pops out.

How can I reproduce such effect?

I know about the trick with watch command, but that's not the solution I'm thinking about.

link|improve this question
feedback

4 Answers

up vote 3 down vote accepted

You're going to need to edit your /etc/syslog.conf.

Adding a line like:

kern.*          /dev/tty10

Would output all kernel info to that tty. You'll need to figure out which tty is assigned to contol-alt-f12. There are many more examples in man syslog.conf.

link|improve this answer
feedback

You need configure this in /etc/syslog.conf (or /etc/syslog-ng.conf depending on syslog version) directing kernel messages to /dev/vc/12 (for alt-ctrl-12).

If there is a log file already, a manual solution is to do something like:

tail -f /var/log/kernel.log > /dev/vc/12

But the permanent way is to set it up for your flavor of syslog

(in my archlinux install there is a predefined rule for this in /etc/syslog-ng.conf, uncommenting it would turn exactly this feature on)

link|improve this answer
feedback

Is this not what xconsole does in X11?
Otherwise you tail -f /dev/console. If I'm wrong here, and dmesg shows more than the console, then you need to look into syslogd.
Set your /etc/syslog.conf to either send kern messages to console, or to whichever stty is attached to the alt-ctrl-F12, which should be /dev/vc/12.
So that's /etc/syslog.conf:

kern.*  /dev/vc/12
link|improve this answer
feedback

I think that you can configure your Linux to execute a Shell Script when you press some keys. For example for Gnome: http://www.codejacked.com/create-custom-keyboard-shortcuts-in-linux/

The shell script file will contain the dmesg command.

link|improve this answer
The point is, it wasn't a shortcut-induced dmesg invocation. It was a virtual terminal designated to the specific task of displaying kernel output, you couldn't modify it content in any way. – Mike Hordecki Aug 26 '09 at 17:30
OK, something similar to this:ubuntuforums.org/showthread.php?t=798247 but instead a desktop background application something to launch with a keyboard shortcut – Onir Aug 26 '09 at 17:45
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.