[plug] Kernel logs

Bernard Blackham bernard at blackham.com.au
Tue Oct 28 21:28:37 WST 2003


On Tue, Oct 28, 2003 at 03:44:02PM +0800, James Devenish wrote:
> (2) Logging of Ethernet link information.

Information such as "up", "down"? This is fairly driver dependent,
and very few drivers I've seen do. The e1000 driver does :)

For stats, such as dropped packets and buffer overruns, ifconfig
serves quite nicely, or /proc/net/dev for a more machine-parseable
version.

> Also: what happens to log entries that have been generated but not
> written to disk (hypothetically: they would appear in the dmesg but
> not in /var/log). Are they saved in memory so that they appear after
> reboot, or are they lost?

One alternative if you care about your kernel logging in times of
despair is to change the size of the ring buffer printk/dmesg uses.
(Or if you're doing kernel debugging and the 16kb default ring
buffer isn't enough) - you can edit it in 2.4 in kernel/printk.c,
around line 40 or so (LOG_BUF_LEN), or in 2.6 it's a compile time
option.

Although this doesn't help if it never gets the chance to write it
to disk again anyway, but for transient failures, it might help. As
others have pointed out, remote logging would probably be the go.

Regards,

Bernard.

-- 
 Bernard Blackham 
 bernard at blackham dot com dot au
_______________________________________________
plug mailing list
plug at plug.linux.org.au
http://mail.plug.linux.org.au/cgi-bin/mailman/listinfo/plug


More information about the plug mailing list