Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Oct 2011 16:09:07 -0400
From:      Arnaud Lacombe <lacombar@gmail.com>
To:        Alexander Best <arundel@freebsd.org>
Cc:        Nikolay Denev <ndenev@gmail.com>, Poul-Henning Kamp <phk@phk.freebsd.dk>, FreeBSD Current <freebsd-current@freebsd.org>, Nali Toja <nalitoja@gmail.com>
Subject:   Re: [RFC] Prepend timestamp in msgbuf
Message-ID:  <CACqU3MVW6_ifayMW77d6JTwmBn=aRwB5C7dn6mJoiwoMHYXTYQ@mail.gmail.com>
In-Reply-To: <20111017194428.GA10094@freebsd.org>
References:  <20111014085609.GA3799@freebsd.org> <40448.1318582809@critter.freebsd.dk> <20111014092445.GA11785@freebsd.org> <20111014093406.GA13981@freebsd.org> <8662jrlor0.fsf@gmail.com> <CACqU3MUznrsT0UD5Dk5sWU%2Bz7cVSPO32GwiubL2qee15=8-cHw@mail.gmail.com> <20111017180111.GA91732@freebsd.org> <CACqU3MUafjo4xRgBtxW8WnSc=b73an7Mc3w0zu=n4ehyv9vdjA@mail.gmail.com> <20111017194428.GA10094@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On Mon, Oct 17, 2011 at 3:44 PM, Alexander Best <arundel@freebsd.org> wrote=
:
> On Mon Oct 17 11, Arnaud Lacombe wrote:
>> Hi,
>>
>> On Mon, Oct 17, 2011 at 2:01 PM, Alexander Best <arundel@freebsd.org> wr=
ote:
>> > On Fri Oct 14 11, Arnaud Lacombe wrote:
>> >> Hi,
>> >>
>> >> On Fri, Oct 14, 2011 at 8:52 AM, Nali Toja <nalitoja@gmail.com> wrote=
:
>> >> > Alexander Best <arundel@freebsd.org> writes:
>> >> >
>> >> >>> On Fri Oct 14 11, Poul-Henning Kamp wrote:
>> >> >>> > In message <20111014085609.GA3799@freebsd.org>, Alexander Best =
writes:
>> >> >>> >
>> >> >>> > >1) would it be possible to prepend those timestamps to the act=
ual console
>> >> >>> > >output and not only to the output of demsg? maybe via a sysctl=
 toggle?
>> >> >>> >
>> >> >>> > The kernel does not know enough about timezones to emit anythin=
g
>> >> >>> > but UTC timestamps.
>> >> >>>
>> >> >>> hmm ok.
>> >> >>>
>> >> >>> >
>> >> >>> > >2) my dmesg output contains a lot of these entries: "<118>"
>> >> >>> >
>> >> >>> > These are magic markers for syslogd(8) specifying priority.
>> >> >>>
>> >> >>> it would be nice, if their output could be turned off via a dmesg=
 flag imo.
>> >> >>>
>> >> >>> >
>> >> >>> > >3) roughly the first 30 lines of my dmesg output have the time=
stamp "[1.0]".
>> >> >>> > >would it be possible to have more accuracy there?
>> >> >>> >
>> >> >>> > No, because we don't know the time until we've found the RTC ch=
ip.
>> >> >>>
>> >> >>> maybe prepending the output with [??] instead of [1.0] would make=
 more sense,
>> >> >>> so users knows that those timestamps are bogus.
>> >> >>
>> >> >> maybe the granularity of the timestamps could be limited to a stat=
ic value? the
>> >> >> following output doesn't really look pretty:
>> >> >>
>> >> >> [7.729516] <118>/dev/ufs/varfs: clean, 879143 free (7407 frags, 10=
8967 blocks, 0.7% fragmentation)
>> >> >> [7.891512] <118>Mounting local file systems:WARNING: TMPFS is cons=
idered to be a highly experimental feature in FreeBSD.
>> >> >> [8.33519] .
>> >> >> [9.440514] <118>Setting hostname: otaku.
>> >> >> [9.744516] wlan0: Ethernet address: 00:0f:b5:82:07:c8
>> >> >> [9.850516] <118>Starting wpa_supplicant.
>> >> >> [10.335514] <118>Starting Network: lo0 ath0.
>> >> >>
>> >> >> so it would be nice, if trailing zeros got printed out, too.
>> >> >
>> >> > Why not make formatting similar to linux/xorg logs, e.g.
>> >> >
>> >> > =A0[ =A0 =A031.897] (**) Option "XkbLayout" "us"
>> >> > =A0[ =A0 =A031.897] (II) XINPUT: Adding extended input device "<def=
ault keyboard>" (type: KEYBOARD, id 7)
>> >> > =A0[ 11485.404] (II) 3rd Button detected: disabling emulate3Button
>> >> >
>> >> > =A0[ =A0 =A00.000000] Linux version 3.0-ARCH (tobias@T-POWA-LX) (gc=
c version 4.6.1 20110819 (prerelease) (GCC) ) #1 SMP PREEMPT Tue Aug 30 08:=
53:25 CEST 2011
>> >> > =A0[ =A0 =A00.000000] Command line: root=3D/dev/disk/by-uuid/625db1=
f5-9b51-4d2d-acb7-6726f4d7e199 ro
>> >> > =A0[...]
>> >> > =A0[ =A0 15.096862] NET: Registered protocol family 10
>> >> > =A0[ =A0 16.792594] [drm] nouveau 0000:01:00.0: plugged DVI-I-2
>> >> > =A0[ =A0 26.054186] eth0: no IPv6 routers present
>> >> >
>> >> > A way to convert those timestamps to localtime or time delta[1] pos=
t-mortem
>> >> > via dmesg(8) would be good, too.
>> >> >
>> >> well, I do not care for the "pretty" side of the thing, however, this
>> >> is just a matter length modifier in the string format; should be
>> >> trivial to fix.
>> >
>> > cc -c -O -pipe -march=3Dcore2 -std=3Dc99 -g -Wall -Wredundant-decls -W=
nested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wi=
nline -Wcast-qual -Wundef -Wno-pointer-sign -Wmissing-include-dirs -nostdin=
c =A0-I. -I/usr/git-freebsd-head/sys -I/usr/git-freebsd-head/sys/contrib/al=
tq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common=
 -finline-limit=3D8000 --param inline-unit-growth=3D100 --param large-funct=
ion-growth=3D1000 =A0-fno-omit-frame-pointer -mno-sse -mcmodel=3Dkernel -mn=
o-red-zone -mno-mmx -msoft-float -fno-asynchronous-unwind-tables -ffreestan=
ding -fformat-extensions -fdiagnostics-show-option -fstack-protector -Werro=
r =A0/usr/git-freebsd-head/sys/kern/subr_msgbuf.c
>> > cc1: warnings being treated as errors
>> > /usr/git-freebsd-head/sys/kern/subr_msgbuf.c: In function 'msgbuf_do_a=
ddchar':
>> > /usr/git-freebsd-head/sys/kern/subr_msgbuf.c:171: warning: format '%d'=
 expects type 'int', but argument 4 has type 'time_t' [-Wformat]
>> > *** Error code 1
>> >
>> > Stop in /usr/obj/usr/git-freebsd-head/sys/ARUNDEL.
>> > *** Error code 1
>> >
>> > Stop in /usr/git-freebsd-head.
>> > *** Error code 1
>> >
>> > Stop in /usr/git-freebsd-head.
>> >
>> FreeBSD has no time_t PRI... macros in any <machine/_inttypes.h>,
>> eventually cast it to `long'.
>
> just wanted to tell you that your patch causes buildkernel to fail on cer=
tain
> archs (amd64 in my case) and that it appears you didn't run
> 'make universe-kernels' to check, whether your patch breaks anything.
>
> i'll leave the details to you.
I have no interest testing architectures/kernels I have no interest
in. Of course, this statement only apply as long as I have no full
control over the future of the feature.

 - Arnaud



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACqU3MVW6_ifayMW77d6JTwmBn=aRwB5C7dn6mJoiwoMHYXTYQ>