Date: Mon, 29 Aug 2022 04:04:24 +0000 From: Pete Wright <pete@nomadlogic.org> To: freebsd-questions@freebsd.org Subject: Re: turn on timestamps in kernel log messages? Message-ID: <20220829040424.wdunjidqvprd76xn@shelly.nomadlogic.org> In-Reply-To: <YwwCi2uvq%2B9TKsFQ@void.f-m.fm> References: <YwuEu68m6kiRFNrc@void.f-m.fm> <20220828165715.fr3gvjk2esatukn5@shelly.nomadlogic.org> <YwuhtfGRIN1pNNZV@void.f-m.fm> <eef21030-3a98-4a25-902c-9f66143c84bf@langille.org> <Ywv%2BZeOeFVVjWsqH@void.f-m.fm> <YwwCi2uvq%2B9TKsFQ@void.f-m.fm>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Aug 29, 2022 at 01:04:27AM +0100, void wrote: > On Mon, Aug 29, 2022 at 12:46:45AM +0100, void wrote: > > On Sun, Aug 28, 2022 at 06:00:34PM -0400, Dan Langille wrote: > > > Did it work? > > > > Not sure yet > > > > This is with it set to 1: > > > > kernel log messages: > > +[2526502] tap3: link state changed to DOWN > > +[2526886] tap3: link state changed to UP > > +[2527114] tap3: link state changed to DOWN > > +[2527124] tap3: link state changed to UP > > +[2527231] tap3: link state changed to DOWN > > +[2527242] tap3: link state changed to UP > > # sysctl kern.msgbuf_show_timestamp=2 > > [2544779] tap12: link state changed to DOWN > [2544789] tap12: link state changed to UP > [2545295] tap12: link state changed to DOWN > [2545306] tap12: link state changed to UP > > so, unfortunately it doesn't give a useful timestamp. > > What I'm looking for is something like 2022-08-29.01:02.05 BST > or even just 2022-08-29.01:02 might be worth adjusting your syslog.conf to capture all kern.* messages, then they'll land in /var/log/messages or somewhere similar and have human readable timestamps. here's an example from my /var/log/messages file: Aug 26 15:50:30 topanga kernel: tun0: link state changed to Up hope this helps, -pete -- Pete Wright pete@nomadlogic.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20220829040424.wdunjidqvprd76xn>