Date: Wed, 23 Nov 2022 07:16:19 +0900 From: Tomoaki AOKI <junchoon@dec.sakura.ne.jp> To: freebsd-current@freebsd.org Cc: garyj@gmx.de Subject: Re: dmesg content lifetime Message-ID: <20221123071619.4d9fc5c297c165ad98cf343d@dec.sakura.ne.jp> In-Reply-To: <20221122191318.1036bc1e@ernst.home> References: <9d519f-ce87-72d-dc6-789817468974@macktronics.com> <20221122104445.4ed88f6f@kan> <c4272589-572a-26a1-7e1e-6ffbe66fc615@macktronics.com> <20221123011655.c6a00ee21636e45e8b4f3a69@dec.sakura.ne.jp> <20221122191318.1036bc1e@ernst.home>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 22 Nov 2022 19:13:18 +0100 Gary Jennejohn <garyj@gmx.de> wrote: > On Wed, 23 Nov 2022 01:16:55 +0900 > Tomoaki AOKI <junchoon@dec.sakura.ne.jp> wrote: > > > On Tue, 22 Nov 2022 09:47:10 -0600 (CST) > > Dan Mack <mack@macktronics.com> wrote: > > > > > On Tue, 22 Nov 2022, Alexander Kabaev wrote: > > > > > > > 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 > > > > > > > > > > Thank you Alexander, I did not know this. I'll USL (use-the-source-luke) > > > :-) > > > > > > Dan > > > > Increase kern.msgbufsize tunable on /boot/loader.conf if you want dmesg > > to live longer. For example, recommended value by iwlwifi team is > > 1146880. Much larger than default. > > > > Note that this is actually a tunable and can be set only on boot time. > > > > Or look at /var/run/dmesg.boot. It doesn't get overwritten. > > -- > Gary Jennejohn It may be overwritten on reboot. And there are dmesg.[today|yesterday] on /var/log/, too. Rotated daily. -- Tomoaki AOKI <junchoon@dec.sakura.ne.jp>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20221123071619.4d9fc5c297c165ad98cf343d>