From owner-freebsd-hackers Mon Jun 21 16:50:54 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from pcpsj.pfcs.com (harlan.clark.net [168.143.10.179]) by hub.freebsd.org (Postfix) with ESMTP id 56C9C14C27 for ; Mon, 21 Jun 1999 16:50:33 -0700 (PDT) (envelope-from Harlan.Stenn@pfcs.com) Received: from mumps.pfcs.com [192.52.69.11] (HELO mumps.pfcs.com) by pcpsj.pfcs.com (8.9.3/8.9.3) via ESMTP id for ; Mon, 21 Jun 1999 19:50:32 -0400 (EDT) Received: from brown.pfcs.com [192.52.69.44] (HELO brown.pfcs.com) by mumps.pfcs.com (8.8.8/8.8.8) via ESMTP id for ; Mon, 21 Jun 1999 16:50:30 -0700 (PDT) Received: from localhost [127.0.0.1] (HELO brown.pfcs.com) by brown.pfcs.com (8.8.8/8.8.8) via ESMTP id for ; Mon, 21 Jun 1999 19:50:30 -0400 (EDT) X-Mailer: exmh version 2.0.2 2/24/98 To: hackers@freebsd.org Subject: dmesg date/timestamps X-Face: "csXK}xnnsH\h_ce`T#|pM]tG,6Xu.{3Rb\]&XJgVyTS'w{E+|-(}n:c(Cc* $cbtusxDP6T)Hr'k&zrwq0.3&~bAI~YJco[r.mE+K|(q]F=ZNXug:s6tyOk{VTqARy0#axm6BWti9C d Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 21 Jun 1999 19:50:29 -0400 Message-ID: <22750.930009029@brown.pfcs.com> From: Harlan Stenn Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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