Subject: ntpd - does it work? Looks like yes. :->
To: None <port-macppc@netbsd.org>
From: Donald Lee <donlee_ppc@icompute.com>
List: port-macppc
Date: 03/16/2000 08:15:51
I started running ntpd (4.0.99g) yesteday, and it's doing very well.
Clock jitter on the PCenter 132 appears to be very small, and immune
to load factors.

The OF hack seems to have gotten the clock "close enough" for ntp to work,
and the NTP kernel option is apparently not necessary for ntpd to
function.

It is noteworthy that ntpd on my 68K machines spits out messages to the
system log that it has lost sync and it is resetting the clock
(usually a fraction of a second, but sometimes more)

Judging from the facts:
	without ntpd I had a constant drift of
	about 1 second a day

	now I have very accurate tracking with my
	ntp ref clocks

	I don't get any "clock reset" or "sync lost" syslog messages

it looks like whatever mechanism(s) ntpd has chosen to use (adjtime()?)
work swell.

Also...

Todd Writesel wrote:
>On MacOS if you ask for the date/time, the toolbox goes straight to the
>clock chip and ignores the tick counter.
>
>Why don't we just write a user-readable clock chip device, and hack xntp
>to use it as an external source? That'd fix this.

This might be OK for xntp ref clock purposes, but that doesn't
fix the problem.  xntp will only adjust the clock a little bit at a
time, assuming that it is relatively accurate.  When it's off
by more, it can "step" the clock, but that makes time occasionally
a non-monotonically increasing function, which makes some things
behave badly (like TCP timeouts).

To use this to really "fix" the 68K problems, you would have to
use the clock chip somehow to replace or somehow modulate the
behavior of the tick counter.  You *could* do this by making the kernel
read the clock chip at some reasonable interval.  This all depends
on how expensive it is to access, the granularity of the clock chip, and
how much coding someone is willing to do. ;->

I think it's also important to remember that the ntp protocol synchronizes
network-wide, and the Mac clock chips, while relatively accurate, do not
compete with the navy.  This means that you'd still have to be able to
"adjust" the mechanism so ntp could sync it with the outside world.

Joy,

-dgl-