Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Oct 1997 11:25:01 -0700 (PDT)
From:      Joseph Stein <joes@seaport.net>
To:        freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org
Subject:   Interesting behaviour from sysctl(kern.boottime)
Message-ID:  <199710221825.LAA17618@shasta.wstein.com>

next in thread | raw e-mail | index | archive | help
I've written myself a utility that polls the boot time (okay, I stole that
part from w(1)) and sends a message to my pager so that I know that 
everything is hunky-dory.

The actual message to my pager would look like this:
Oct 22 11:00:05 shasta status: up 1+13:40:20 [2 users]


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
-----
System time is (877536000) Wed Oct 22 09:00:00 1997
System Booted at (877407589) Mon Oct 20 21:19:49 1997
                             ^^^^^^^^^^^^^^^^^^^
Difference is: 128411 seconds
-----
System time is (877539600) Wed Oct 22 10:00:00 1997
System Booted at (877407587) Mon Oct 20 21:19:47 1997
                             ^^^^^^^^^^^^^^^^^^^
Difference is: 132013 seconds
-----
System time is (877543205) Wed Oct 22 11:00:05 1997
System Booted at (877407585) Mon Oct 20 21:19:45 1997
                             ^^^^^^^^^^^^^^^^^^^
Difference is: 135620 seconds
----------------- cut here --------------

Is this a "feature" or a "bug".  I would think that the boottime should
_not_ change.

I run xntpd.  Could that be a factor? (updating the clock ticks or whatever?)
I haven't yet looked at the kernel sources that track the boot time, but
it does get kind of interesting to see the system be up for two more seconds
(or so) every hour...

joe



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