Messages in this thread | | | Date | Mon, 13 Mar 2000 17:08:14 -0500 (EST) | From | "Richard B. Johnson" <> | Subject | Re: Kernel bug question... |
| |
On Mon, 13 Mar 2000, Mike A. Harris wrote:
> On Fri, 10 Mar 2000, Richard B. Johnson wrote: > > >> This machine is running 2.0.36 compiled with gcc 2.7.2.3, and has > >> Syslog: syslogd 1.3-3 > > > >A guess. If you are having the kernel send messages, i.e., you are > >going through printk(), and the messages are streaming, you are > >running into the fact that printk() has a fixed-length buffer and > >just truncates anything that can't fit. > > > >This is more-or-less necessary because printk() was designed to > >print "panic" and such even after memory allocation failed.... > > Ok, that is acceptable, but how big is this buffer in > 2.0.36? There seem to be log entries that are much longer than > the ones that are chopped off, and the part chopped off is > consistently the *START* of the buffer, not the end. Odd. I > don't know if the same occurs under 2.2.x or not.. >
The current log buffer is 16384 bytes in length. It's in ../linux/kernel/printk.c. If you are using printk() to log something that you can't keep up with, you are either logging to a very slow drive, or you are logging way too much data. printk() was not designed to be a general-purpose logging device. It's supposed to handle logging failures while minimizing the resources used so there is a good chance that it actually gets logged somewhere.
If you are trying to log network activity, you need to use tcpdump or some write-your-own user space utility.
Cheers, Dick Johnson
Penguin : Linux version 2.3.41 on an i686 machine (800.63 BogoMips).
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |