timestamping for kernel messages (like Solaris and Linux)

Niki Denev nike_d at cytexbg.com
Sun Jun 8 12:13:19 UTC 2008


On Sun, Jun 8, 2008 at 2:59 PM, Peter Jeremy
<peterjeremy at optushome.com.au> wrote:
> On 2008-Jun-08 10:24:53 +0300, Niki Denev <ndenev at gmail.com> wrote:
>>Has anyone thought about implementing an option
>>to prepend all kernel console messages with timestamps,
>>like Linux and Solaris do?
>
> The only time I've seen Solaris do this is when the console message
> is syslog'd - which FreeBSD also does.
>
>>Is it just a matter of hacking up the kernel printf() implementation?
>
> Pretty much.
>
>>Any possible caveats?
>
> The kernel works in UTC only and has only a very restricted ability
> to translate between epoch seconds and a human-readable date/time
> (it's currently only used to talk to the RTC).
>

I'm looking at a Linux machine right now, and it looks like
they use the time since boot (actually uptime) for the timestamps.

Anyways, does this sound like something that FreeBSD should have?
It could be useful in some situations, like embedded applications
without running syslog,
full /var partitions, etc.

--
Niki


More information about the freebsd-hackers mailing list