From owner-freebsd-hackers Thu Oct 23 01:57:11 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id BAA11712 for hackers-outgoing; Thu, 23 Oct 1997 01:57:11 -0700 (PDT) (envelope-from owner-freebsd-hackers) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id BAA11687; Thu, 23 Oct 1997 01:57:05 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.6.9) id SAA29257; Thu, 23 Oct 1997 18:53:26 +1000 Date: Thu, 23 Oct 1997 18:53:26 +1000 From: Bruce Evans Message-Id: <199710230853.SAA29257@godzilla.zeta.org.au> To: freebsd-hackers@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG, joes@seaport.net Subject: Re: Interesting behaviour from sysctl(kern.boottime) Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >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