Subject: Re: NTPD Time Sync doesn't work (was: What do you use NetBSD/Mac68k
To: RAParker <RAParker@Quadzilla.net>
From: Frederick Bruckman <fredb@immanent.net>
List: port-mac68k
Date: 11/18/2002 19:40:54
On Mon, 18 Nov 2002, RAParker wrote:

> On Mon, Nov 18, 2002 7:48 AM, Jonathan Newquist <jnewquis@esu10.org>
>  wrote:
> > have you tried installing ntpd?
>
> Oh yes...not only have I installed it, I've studied it and tested it and
> studied it some more. Below you'll find some log files and diagnostics from
> ntpd to show what's going on.
>
> Essentially, NTPD appears to force set the clock about every 20 minutes
> ONLY. I haven't found any documentation that tells me how to adjust this
> frequency.

The time steps every "maxpoll" interval period are pathological.
"ntpd" *is* *not* supposed to do that. You can vary "maxpoll" in
"/etc/ntpd.conf", but that's not a solution to this problem.

> Under a load, the time loss can be in the neighborhood of several minutes or
> more.

It's a well known problem, having to do with the clock chip on the
Macs not being wired to the highest priority interrupt on the m68k
chip, as it is on every other make of computer.

> > you can make all your
> > internal boxes "peers" to each other, and they should sync well enough for
> > your logfile purposes.
> > I have heard DEC machines had excellent clocks; dont
> > know if that would be true of your Compaq too.
>
> Yes, my Proliant 850R keeps nearly perfect time (+ or - 1 second a day) and
> is specified as a "peer" and as "prefer" in the Quadra's ntp.conf along with
> 3 other stratum 1 servers...but still, the Quadra's NTPD resets the clock
> ONLY every 20 minutes no matter how much loss accumulates.

There's your solution... Try setting up the Proliant as a "timed"
server. In its "/etc/mk.conf", add

    timed=YES
    timed_flags="-M -F localhost"

to make it a master, and start "timed". Then just start "timed" on the
Macs, but without the flags, and they'll automatically declare
themselves slaves to the master.

"timed" doesn't have to deal with any of the constraints imposed by
"ntpd"'s theory of operation. There are no sanity checks. Slaves just
poll the master periodically, and slew as required. Right now my 840AV
is within 23ms of the i386 master running "ntpd", so it doesn't get
much better than that.

Frederick