[ntp:questions] offline machines' time synchronization

Terje Mathisen "terje.mathisen at tmsw.no" at ntp.org
Fri May 25 07:29:52 UTC 2012

Chris Albertson wrote:
> Next how to get the PPS to be at the top of the second.  Two methods
> 1) don't bother.  Linux PPS will log the time of both the GPS's PPS
> and the Rb PPS.  Read the log file to determine the offset.  This give
> offset with uSec precision.  To get better you need a hardware time
> interval counter.  I happen to have a few of those and can read
> sub-nanoseconds but this is gross overkill.  Microseconds are good
> enough for NTP.
> 2) You can adjust the phase of the PPS by speeding up the Rb frequency
> well above what it should be for some number of seconds and then
> slowing it back to the "correct" speed.  This exercise will move the
> phase.  Slowing it will work to move the phase in the other direction.
> 3) For gross adjustment of the phase a "big hammer" works.  Power
> cycle the Rb unit and chances are the phase will change by some
> totally random amount.   Repeat this process as required.  Yes this
> sounds stupid but on average you can get "close" with not to many
> cycles.   Then you apply ether of the two above methods.   (I call
> this "spin the clock hands".  At you were to spin the hands on a real
> clock like a roulette wheel they would land in the correct number one
> in twelve times.)

Much simpler would be to use a fudge command to specify the current 
phase offset between the Rb and GPS PPS signals, i.e. if the Db happened 
to start out 367 ms off, just let ntpd know that these pulses are 
supposed to have such an offset.

With the Oncore UT+ this is actually a feature: You can specify an 
arbitrary offset from the top of the second, in order to avoid any 
"thundering herd" effect from many other processes that also want's to 
wake up every second, exactly on the second.

No matter how you solve this problem, I agree that having a very cheap 
and extremely stable local timebase provides great gps backup/holdover.


- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"

More information about the questions mailing list