Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jun 1999 19:50:29 -0400
From:      Harlan Stenn <Harlan.Stenn@pfcs.com>
To:        hackers@freebsd.org
Subject:   dmesg date/timestamps
Message-ID:  <22750.930009029@brown.pfcs.com>

next in thread | raw e-mail | index | archive | help
There are several sorts of messages that get logged by the kernel where it 
would be Really Nice if the messages were timestamped.

If syslogd is up and running (and the data gets stored before the system 
dies) there is a good chance that syslogd will timestamp the messages.

One way to do this would be to import something like strftime and gmtime/
localtime into the kernel.  While strftime seems potentially useful and 
gmtime isn't all that miserable, I can't imagine throwing localtime into 
the kernel.

As a potential alternative, I have some small, fast routines that will handle 
converting an epoch date into MM DD and YYYY fields.  Converting "seconds 
since midnight" is pretty simple.

I see several potential problems/issues:

- I suspect many folks will want the timestamps in local time.  The 
  question is how should we get the local time offset into the kernel?

  I'm tempted to simply leave it as an int tz_offset/char *tzname in the
  kernel, and let  an "outside" process deal with changing these values.

  If folks are Horribly Concerned about the race, we can have a value that 
  says {UCT,xST,xDT} and keep a separate offset/tzname for xST and xDT.

  I have a concern that the timezone stuff will cause a small tempest...

- I suspect that there are folks would want to start using international
  date formats instead of, say YYYYMMDD:HHMMSS[{+,-}OFFSET tzname]
  This may require a bit too much code for something like this.

So, I guess I have the following questions for you:

- Does anybody object to seeing this capability in the kernel?

- Should I stick with a simple YYYYMMDD:HHMMSS[{+,-}OFFSET tzname] stamp?

- Should I use sysctl for the timezone stuff?

- When I'm done, should I submit this as a PR or should I ship it to 
  somebody for review?  If the latter, who?

Please keep me in the Cc: list; I'm not currently subscribed to hackers.

H



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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