Timekeeping oddities on MacMini G4s

Hal Murray hmurray at megapathdsl.net
Wed Feb 1 07:56:30 UTC 2017


benh at kernel.crashing.org said:
> Ok, I do have one though somewhere with OS X on it. If you give me
> instructions on how to test (I know near to nothing about ntpsec), I should
> be able to compile and run it.

I'm assuming you are already running the normal ntpd from ntp classic, or 
Apple's version of it.

ntpq -c "rv 0 frequency" <host-name, defaults to localhost>
will get you the fudge-factor that ntpd passes to the kernel to get
the clock ticking accurately.  Units are parts-per-million.

There is a source-address filter in ntp.conf (restrict is the keyword), so 
try from localhost if it doesn't work from the net.

The problem that started this is that it's off by more than 500 ppm.  If all 
the arithmetic and documentation is correct, it should be the crystal error.  
A few or few 10s of ppm is reasonable at normal temperature.  Over 50 is a 
bit strange, but anything under 100 is within normal.  Over 100 is getting 
suspicious but could easily be due to some round off someplace.



ntpsec should be the same as ntp classic.  I tried ntp classic on FreeBSD 
(same trouble) but haven't tried it on Debian.

If you want to try ntpsec...

git clone git at gitlab.com:NTPsec/ntpsec.git xxx
cd xxx
./waf configure build check

I think it builds cleanly on OS-X, but I can't verify that.

ps ax | grep ntpd  # to get args
service ntpd stop
./build/main/ntpd/ntpd <args-from-above>

Unless you are doing something unusual, it should run with your existing 
ntp.conf and get the same frequency correction.



-- 
These are my opinions.  I hate spam.





More information about the devel mailing list