[ntp:questions] Long term disciplining against 1PPS reference only

Charbonneau, André Andre.Charbonneau at nrc-cnrc.gc.ca
Thu Oct 11 14:45:54 UTC 2018


Hi all,

Recently I've been trying to get one of my NTP server (a Raspberry Pi), to stay synchronized to a 1PPS signal coming from a Rb clock over long periods of time when all other sources are unavailable.  The NTP server on the RPi is configured to have a couple upstream stratum 2 servers, plus the 1PPS driver, and a local clock driver.  For example:


# Kernel-mode PPS ref-clock for the precise seconds
server 127.127.22.0 minpoll 4 maxpoll 4
fudge 127.127.22.0 refid PPS

# Stratum 2 servers:
server nnn.nnn.nnn.nnn iburst prefer

server nnn.nnn.nnn.nnn iburst prefer

server nnn.nnn.nnn.nnn iburst prefer

# Local clock driver
server 127.127.1.0
fudge  127.127.1.0 stratum 10

The NTP version I'm running is ntpd 4.2.8p10 at 1.3728-o Thu Jul 12 19:43:06 UTC 2018 (1), on

Raspbian GNU/Linux 9.3 (stretch).




So here is the overall scenario I'm trying to achieve:


1.  The NTP server starts up, and sees all references and happily syncs to the 1PPS.

2. After a while, the upstream stratum 2 servers all become unreachable (i.e., a network outage).  The 1PPS and local clock are the only 2 remaining references.

3. The NTP server continues to be synchronized via the 1PPS driver during the stratum 2 outage (which could last many hours)



The problem I'm seeing is that soon after (~10 minutes) the upstream stratum 2 servers become unreachable, the 1PPS also looses synchronization and the local clock starts to free run.


Reading more about this, it is documented (Computer Network Time Synchronization 2nd edition, by D. L. Mills, section 3.11.4) that I should be using the following command to tell NTP to keep the 1PPS synchronization even if no other sources are present:


"tos minsane 0"


I've put this command at the very top of my ntp.conf, restarted ntpd but it seems to have no effect and the problem still happens. (I verified that I'm indeed editing the correct ntp.conf file.)


Maybe I'm not using the tos command correctly?


I've found a workaround by putting the "prefer" keyword also on the local clock entry in ntp.conf but I would like to understand why the "tos minsave 0" does not work for me.




Any information about this would be much appreciated.


Thanks!

  Andre



More information about the questions mailing list