[chrony-users] questions about gps with ntp fallback |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-users Archives
]
- To: chrony-users@xxxxxxxxxxxxxxxxxxxx
- Subject: [chrony-users] questions about gps with ntp fallback
- From: James Knight <james.knight@xxxxxxxxxxxxxxxxxxx>
- Date: Tue, 17 Nov 2015 19:40:08 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rockwellcollins_com.20150623.gappssmtp.com; s=20150623; h=mime-version:date:message-id:subject:from:to:content-type; bh=Ve5nH62L0G/Spj1FjK+sALTZcc4ozwXtWV/PshnqS5c=; b=csWKYtG//55mKX8dJk+6AUXWBcoLdxUcSUm5aL0GsCtj38WBJx+ODA5qTm3EUJQr5J 3WSXLt1F5AailImCXJE8IpHcDrEIqRAPD+JwVrJ51sfpxVa+/3SWtFrUVV1+bESUUdxT L3ySdpgsEUfhb/HkTEzl3PZnhUJzNI6BtHWW0LbauU96r00/q/0PrmKjIyl8OJXul6fx eJ6pfIdpxnEx3ACmzhZ6wbcjSBFQqW5eeV7A71YwmO4Vw7p9dXsEuecZjej3Q9CCyeSw XFeEtQMKanDv32sejGJXEvgImOW3VRirOUK/K9rTlgvubDy6qm3pBXZYNCakz/bQ/G6A vU5g==
(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.