From nobody Tue Nov 22 22:16:19 2022 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NGz9z1xLGz4hlR6 for ; Tue, 22 Nov 2022 22:16:23 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Received: from www121.sakura.ne.jp (www121.sakura.ne.jp [153.125.133.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4NGz9y69mXz4KwQ for ; Tue, 22 Nov 2022 22:16:22 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Authentication-Results: mx1.freebsd.org; none Received: from kalamity.joker.local (123-1-88-210.area1b.commufa.jp [123.1.88.210]) (authenticated bits=0) by www121.sakura.ne.jp (8.16.1/8.16.1/[SAKURA-WEB]/20201212) with ESMTPA id 2AMMGJrc038029; Wed, 23 Nov 2022 07:16:20 +0900 (JST) (envelope-from junchoon@dec.sakura.ne.jp) Date: Wed, 23 Nov 2022 07:16:19 +0900 From: Tomoaki AOKI 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> <20221123011655.c6a00ee21636e45e8b4f3a69@dec.sakura.ne.jp> <20221122191318.1036bc1e@ernst.home> Organization: Junchoon corps X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.0) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4NGz9y69mXz4KwQ X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:7684, ipnet:153.125.128.0/18, country:JP] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Tue, 22 Nov 2022 19:13:18 +0100 Gary Jennejohn wrote: > On Wed, 23 Nov 2022 01:16:55 +0900 > Tomoaki AOKI wrote: > > > On Tue, 22 Nov 2022 09:47:10 -0600 (CST) > > Dan Mack wrote: > > > > > On Tue, 22 Nov 2022, Alexander Kabaev wrote: > > > > > > > On Tue, 22 Nov 2022 09:12:28 -0600 (CST) > > > > Dan Mack 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