Re: wrong kern.boottime

From: Poul-Henning Kamp <phk_at_phk.freebsd.dk>
Date: Thu, 05 Feb 2004 14:20:08 +0100
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.
Received on Thu Feb 05 2004 - 04:20:53 UTC

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