From nobody Tue Nov 22 21:03:50 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 4NGxZT52Klz4hbbF for ; Tue, 22 Nov 2022 21:04:01 +0000 (UTC) (envelope-from ted@io-tx.com) Received: from io-tx.com (io-tx.com [205.166.246.111]) (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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "*.io-tx.com", Issuer "AlphaSSL CA - SHA256 - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NGxZT2TGTz465p for ; Tue, 22 Nov 2022 21:04:01 +0000 (UTC) (envelope-from ted@io-tx.com) Authentication-Results: mx1.freebsd.org; none Received: from io-tx.com (io-tx.com [205.166.246.111]) (authenticated bits=0) by io-tx.com (8.17.1/8.16.1) with ESMTPSA id 2AML3oI9064440 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 22 Nov 2022 15:03:50 -0600 (CST) (envelope-from ted@io-tx.com) Date: Tue, 22 Nov 2022 15:03:50 -0600 (CST) From: Ted Hatfield To: "Rodney W. Grimes" cc: Mike Karels , Dan Mack , Warner Losh , freebsd-current@FreeBSD.org Subject: Re: dmesg content lifetime In-Reply-To: <202211221925.2AMJP2jT054228@gndrsh.dnsmgr.net> Message-ID: <8e999d31-e37f-7cda-509e-cf1d83fc9fca@io-tx.com> References: <202211221925.2AMJP2jT054228@gndrsh.dnsmgr.net> 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; format=flowed X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,AWL, KAM_DMARC_STATUS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on io-tx.com X-Rspamd-Queue-Id: 4NGxZT2TGTz465p X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:55103, ipnet:205.166.246.0/24, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Tue, 22 Nov 2022, Rodney W. Grimes wrote: >> On 22 Nov 2022, at 9:34, Dan Mack wrote: >> >>> It disappears a piece at a time - the oldest entries disappear first. However, it vanishes even when there are only 2-3 lines in it so I didn't think capacity was in play as I expected. >>> >>> So for example I might see a rate-limit entry from someone spamming the system and then it will usually be gone in a couple days and the buffer is completely empty. Similarly if I do something like ifconfig em0 down; ifconfig em0 up ; it's logged but disappears after a day or so. >>> >>> I'm looking to see if this is just a cron job or something clearing it as it might be user-error on my part. Also this is an older system so I'll probably look at it again after I update. >> >> I noticed this too, but discovered with ?dmesg -a? that the buffer was full >> of syslog messages, so dmesg without -a showed nothing. >> >> It seems unfortunate that syslog messages logged in the message buffer, at >> least once syslogd is running. Apparently this happens because they are >> output to /dev/console. >> >> Mike > > I very much dislike this behavior. I though that the kernel dmesg buffer > was for kernel messages only and that I could always count on going there > for any kernel messages about a problem that has occurred, expecting to > see my boot time output if nothing had happened since boot. Now instead > I am almost always greated with an empty buffer :-(. > > Rod > It's been this way for as long as I can remember. Decades probably. Ted >> >>> Thank you, >>> >>> Dan >>> >>> >>> On Tue, 22 Nov 2022, Warner Losh wrote: >>> >>>> On Tue, Nov 22, 2022 at 8:13 AM 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? >>>>> >>>> >>>> It already is a fixed memory size. Do you see it all disappear at once, or >>>> over time? >>>> >>>> Warner >>>> >> >> >> > > -- > Rod Grimes rgrimes@freebsd.org > >