Re: [RFC] Prepend timestamp in msgbuf

From: Alexander Best <arundel_at_freebsd.org>
Date: Fri, 14 Oct 2011 08:56:09 +0000
On Fri Oct 14 11, Nikolay Denev wrote:
> 
> On Oct 13, 2011, at 9:40 PM, Arnaud Lacombe wrote:
> 
> > Hi,
> > 
> > On Thu, Oct 13, 2011 at 2:00 PM,  <lacombar_at_gmail.com> wrote:
> >> From: Arnaud Lacombe <lacombar_at_gmail.com>
> >> 
> >> Hi folks,
> >> 
> >> There is many case recently when I really wished timestamp were present in the
> >> post-mortem msgbuf. Such situation could be when userland application segfault
> >> potentially triggering a panic/crash, or have information about the time-wise
> >> location of a given message (kernel or userland).
> >> 
> >> Attached patch is available in the git repository at:
> >>  git://github.com/lacombar/freebsd.git master/topic/msgbuf-timestamp
> >> 
> >> Arnaud Lacombe (3):
> >>      msgbuf(4): convert `msg_needsnl' to a bit flag
> >>      msgbuf(4): add logic to prepend timestamp on new line
> >>      msgbuf(4): add a sysctl to toggle timestamp prepend
> >> 
> >>  sys/kern/subr_msgbuf.c |   53 ++++++++++++++++++++++++++++++++++++++++-------
> >>  sys/sys/msgbuf.h       |    4 ++-
> >>  2 files changed, 48 insertions(+), 9 deletions(-)
> >> 
> 
> Cool!
> 
> I've dreamt for something like this for a long time, it can be very useful.

great work! a have a few comments however:

1) would it be possible to prepend those timestamps to the actual console
output and not only to the output of demsg? maybe via a sysctl toggle?

2) my dmesg output contains a lot of these entries: "<118>"

3) roughly the first 30 lines of my dmesg output have the timestamp "[1.0]".
would it be possible to have more accuracy there?

4) maybe a new dmesg flag would be a good idea to suppress timestamps.

cheers.
alex

> 
> Regards,
> Nikolay
> 
Received on Fri Oct 14 2011 - 06:56:09 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:19 UTC