wrong kern.boottime

Poul-Henning Kamp phk at phk.freebsd.dk
Thu Feb 5 05:20:53 PST 2004


In message <075c01c3ebea$178b36e0$7890a8c0 at dyndns.org>, "Cyrille Lefevre" write
s:

>> >ntpd is running, so, I'm on time.
>>
>> Hmm, I'm not sure where last gets it's number from, maybe from utmp.
>
>no, from wtmp.
>
>> If the utmp record is written on boot before ntpd corrects the clock
>> that would be one explanation...
>>
>> Either way, I'm pretty sure that kern.boottime contains what it should
>> contain:  Our best estimate of the time when the system was booted.
>
>absolutely not, the real boot time was the wtmp time which is the same
>as /var/run/dmesg.boot.
>
>a proof of the real boot time :
>
># bzgrep Accounting /var/log/messages.*
>messages.2.bz2:Feb  1 21:40:43 <kern.notice> gits kernel: Accounting enabled

This is only a proof if the machine was NTPD'synced at this time.

If your CMOS clock was a couple of days off, your system would boot with
that time, and not until NTPD gets its act together would the clock
be stepped to the right time.

This is still the best theory I can come up with.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-current mailing list