Subject: Re: dmesg number of lines limit
To: None <mherzog@attbi.com>
From: None <cgd@broadcom.com>
List: netbsd-help
Date: 04/10/2002 14:33:20
At Wed, 10 Apr 2002 20:43:06 +0000 (UTC), "Matt Herzog" wrote:
> I have always wanted to know how to make dmesg infinite. I see lots of 
> interesting info scroll off screen to be lost forever. It all gets chopped 
> off dmesg.boot. Bummer.

Well, you can easily make it larger using the 'MSGBUFSIZE' kernel
build option.  (see options(4) for details.)


It's not really feasable to make it 'inifinite.'

Among other things, the message buffer is set up so that (on systems
which don't zero memory on reboot), it will survive reboot.  This
allows messages from previous kernel runs (e.g., crash messages) to be
kept.

Further, even if one discarded that valuable feature, to make it
infinite you'd potentially need to allocate additional memory (to
accomodate additional messages), and you can't safely do so from many
places data is entered into the log.


looked at another way, if you bump up MSGBUFSIZE to a large enough
value that you don't lose messages because of overflow, syslogd makes
it infinite, by taking messages from the kernel message buffer and
putting them into log files.  8-)


chris