NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/54729: dmesg(8) trims leading whitespaces of kernel messages



The following reply was made to PR bin/54729; it has been noted by GNATS.

From: Robert Elz <kre%munnari.OZ.AU@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: bin/54729: dmesg(8) trims leading whitespaces of kernel messages
Date: Tue, 31 Dec 2019 07:23:55 +0700

     Date:        Mon, 30 Dec 2019 22:45:01 +0000 (UTC)
     From:        Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>
     Message-ID:  <20191230224501.4EBA77A1D6%mollari.NetBSD.org@localhost>
 
   |  BTW, is it intentional that timestamp format is different between
   |  kernel (and /kern/msgbuf) and dmesg?
 
 Yes.   Though neither (particularly dmesg) is really complete, the %5jd
 vs %4jd difference just reflects the common uses - kernel messages are
 appearing all the time (ages after the system booted), dmesg tends to be
 used mostly soon after boot, and only sees smaller second counters typically
 (and of course, the field with simple expands if needed, so the only effect
 is radix alignment).
 
 The intent is/was that the precision of the timestamp be variable (via a
 sysctl for the kernel) - but that part has never been implemented, after
 some discussion a more or less adequate precision was simply adopted.
 Much of what is in dmesg is to cope with that when it appears (and dmesg should
 allow output with a different - reduced - precision if desired, but doesn't).
 
 The kernel also always uses '.' as the radix (no locale stuff gets in there)
 but dmesg uses whatever is the user's locale's radix character.
 
 kre
 


Home | Main Index | Thread Index | Old Index