How to wait for kernel messages?
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
EMail: [email protected]
Quoted 9 lines · Sebastian Piecha
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.