Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 05 Feb 2004 14:20:08 +0100
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        "Cyrille Lefevre" <clefevre-lists@9online.fr>
Cc:        "current @FreeBSD.org" <freebsd-current@freebsd.org>
Subject:   Re: wrong kern.boottime 
Message-ID:  <44131.1075987208@critter.freebsd.dk>
In-Reply-To: Your message of "Thu, 05 Feb 2004 14:15:13 %2B0100." <075c01c3ebea$178b36e0$7890a8c0@dyndns.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <075c01c3ebea$178b36e0$7890a8c0@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@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.



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