[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Console Messages



David Stroupe wrote:
Rick Stevens wrote:

David Stroupe wrote:

I am running a RH7.2 installation. I am doing driver developement and would like to view the (sometimes) useful prink messages from the driver in real time without having to type dmesg. Is there a way to do this?



There is a commented-out line in /etc/syslog.conf that looks like:


#kern.* /dev/console

If uncommented, it would spit all kernel messages onto the console.
If you modify it to:

kern.* /var/log/name-of-printk-messages-file

then "kill -HUP `pidof syslogd`", kernel messages would end up in
the named file which you can watch with "tail -f" rather than the
console.

When you're all done, don't forget to comment out the line and send
the SIGHUP back to syslogd so the file doesn't grow too big.  Keep in
mind that the normal log rotation scripts won't know about your new
file, so they won't be processed by it.


Thanks Rick, just an additional question or two. Of all the virtual consoles ctrl-alt -f1 etc, is one of them designated to be 'THE' console?

Well, not really. /dev/console refers to wherever root is logged into OR /dev/tty0 (alt-F1) if root isn't logged in. It will never be over the network (never /dev/pts/*)

> Do I need to reboot after making the /etc/syslog.conf change?

No, just send the syslogd daemon a SIGHUP. Some ways to do that are:

	1) find the PID of syslogd via "ps" and do "kill -HUP pid"
	2) kill -HUP `cat /var/run/syslogd.pid1`
	3) kill -HUP `pidof syslogd`

Note the graves (backquotes) in 2 and 3, above.  I prefer the third
option.
----------------------------------------------------------------------
- Rick Stevens, SSE, VitalStream, Inc.      rstevens vitalstream com -
- 949-743-2010 (Voice)                    http://www.vitalstream.com -
-                                                                    -
-     Never put off 'til tommorrow what you can forget altogether!   -
----------------------------------------------------------------------





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]