[chrony-users] questions about gps with ntp fallback

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


(beginner user here with chrony, let alone advanced ntp/etc.; please be gentle)

Trying to support a system build which may or may not have access to a
GPS and/or NTP server at given times. My setup at this time includes
the use of gpsd (v3.15) and chrony (v2.2). I configured a chrony
instance using the following options:

---
allow
server <ntpserver> minpoll 4 maxpoll 6 iburst
refclock SOCK /var/run/chrony.ttyS1.sock refid PPS prefer iburst
makestep 0.1 10
---

With this setup, I'm able to query/synchronize with either source (ie.
if I start with only a reachable GPS or NTP source, it will
synchronize with the given source). As expected, if both GPS and NTP
are available, the system synchronizes with the GPS source. For
example:

(GPS and NTP sources available)
210 Number of sources = 2
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#* PPS                           0   4   277    16    +20us[  +36us] +/-   42us
^- <ntp server>                  5   6   377    39    +33ms[  +34ms] +/-  290ms

What I do not understand is what I observe when I unplug or power down
my GPS receiver. If I simulate a GPS disconnect (ex. power failure,
cable accidentally removed, etc.), I would expect that synchronization
of the system will fallback to the NTP source over time. While it does
appear to happen, sometimes it takes over an hour and a half to do so.
For example:

(GPS unplugged for almost half an hour)
#* PPS                           0   4     0   28m  +3879ns[  -17us] +/-  566us
^- <ntp server>                  5   6   377    10    +18ms[  +18ms] +/-  281ms

(GPS unplugged for over an hour; finally switching over to NTP source
around 75m)
#? PPS                           0   4     0   75m  -9504us[  -17us] +/-  625us
^* <ntp server>                  5   6   377    13  -4463us[-5148us] +/-  275ms

Is it expected to take this long? I've seen the turn over from GPS to
NTP occur over ~18 minutes and ~35 minutes as well. Note that when I
hook up the GPS unit again, the switch over from NTP to GPS is always
done under two minutes.

I assume what is happening is that chrony perceives/calculates that
the time information from the GPS source is still "more correct" than
the NTP source even though it is disconnected. Only when the
calculated time from the GPS source cannot be guaranteed better than
the NTP source, it switches over. Is this assumption correct? If not,
could someone explain what I am observing?

Thanks.

(also, feel free to correct me on incorrect terminology, settings, etc.)

-- 
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/