Re: dmesg content lifetime

From: Alexander Kabaev <kabaev_at_gmail.com>
Date: Tue, 22 Nov 2022 15:44:45 UTC
On Tue, 22 Nov 2022 09:12:28 -0600 (CST)
Dan Mack <mack@macktronics.com> wrote:

> It seems like dmesg content ages out over time.   Is there a way to
> leave the contents based on a fixed memory size instead?
> 
> Dan
> 
I think this is how it works: the kernel message bugger is of fixed
size and kernel and syslog sequences (dmesg -a) share it. The other
syslog users eventually puts enough content in there to displace all of
kernel messages. If the kernel stays quiet, 'dmesg' then returns
nothing, as by default it filters syslog entries that do not KERN
facility out, see sbin/dmesg/dmesg.c.

-- 
Alexander Kabaev