lkml.org 
[lkml]   [2003]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: How to wait for kernel messages?
On Mon, 13 Oct 2003, Sebastian Piecha wrote:

> I have some problems with one NIC. Due to lack of time as an
> workaround I'd like to wait for the kernel message "NETDEV WATCHDOG:
> eth0: transmit timed out" and ifconfig down/up the NIC.
>
> How can I trigger any action by such a kernel message? Do I have to
> grep the kernel log?
>
> Mit freundlichen Gruessen/Best regards,
> Sebastian Piecha

`cat /proc/kmsg`

...or to wait forever for each message, just open /proc/kmsg and
post a read. Note that kernel logger is also waiting for such
messages so you might not get them all.

Of course the 'Unix-way' is to just do `tail -f /var/log/messages`,
or whatever your log-file name is.


Cheers,
Dick Johnson
Penguin : Linux version 2.4.22 on an i686 machine (797.90 BogoMips).
Note 96.31% of all statistics are fiction.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.033 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site