Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Oct 1997 18:53:26 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-hackers@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG, joes@seaport.net
Subject:   Re: Interesting behaviour from sysctl(kern.boottime)
Message-ID:  <199710230853.SAA29257@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>But, I've come to notice the following:  (five executions worth of data:)
>
>----------------- cut here --------------
>System time is (877528801) Wed Oct 22 07:00:01 1997
>System Booted at (877407594) Mon Oct 20 21:19:54 1997
>                             ^^^^^^^^^^^^^^^^^^^
>Difference is: 121207 seconds
>-----
>System time is (877532401) Wed Oct 22 08:00:01 1997
>System Booted at (877407591) Mon Oct 20 21:19:51 1997
>                             ^^^^^^^^^^^^^^^^^^^
>Difference is: 124810 seconds
>-----
>...
>I run xntpd.  Could that be a factor? (updating the clock ticks or whatever?)

Yes, it changes the boot time whenever it calls settimeofday() to step
the clock.  settimeofday() always adjusts `boottime' when it adjust
`time'.  This is correct when both were wrong originally, but completely
wrong if the clock has drifted.  A drift of 3 seconds per day is good
if xntpd is _not_ used, but xntpd not step the clock if it is correctly
configured and the system is always connected.

Bruce



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