[chrony-users] Let chrony prefer gps source but allow online sources

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


Hopefully someone can assist on this. We're working on a mobile machine with gps and 4g connection. The goal is to have chrony sync time mainly with gps. Although, often the machine is started inside without gps reception and only receives gps signals after some time.
Therefore we also want to allow chrony to use online sources to start syncing time directly on boot but prefer gps when available.

Our config file looks like below:
-------------------------------
# GPS sync:
refclock SHM 0 refid GPS precision 1e-1 offset 0.08 delay 0.2 prefer trust poll 2
refclock SHM 1 refid PPS precision 1e-9

# Online sources
pool ntp.ubuntu.com maxsources 4

allow 0/0

log rtc

logchange 0.5
-------------------------------

While restarting the machine with a gps fix lets chrony sync nicely with gps, it doesn't do so when it synced with online sources first. Chrony never 'switches' to gps, although it is set as preferred. Moreover, it seems that it doesn't even receive measurement from gps?

-------------------------------
chronyc sources:

210 Number of sources = 6
MS Name/IP address         Stratum Poll Reach LastRx Last sample              
===============================================================================
#? GPS                           0   2     0     -     +0ns[   +0ns] +/-    0ns
#? PPS                           0   4     0     -     +0ns[   +0ns] +/-    0ns
^- alphyn.canonical.com          2  10   337   824  -5600us[-5487us] +/-  115ms
^* chilipepper.canonical.com     2  10   325   682  -2029us[-1915us] +/-   60ms
^+ golem.canonical.com           2  10   103   900  -1951us[-1839us] +/-   51ms
^+ pugot.canonical.com           2  10   327   149   -704us[ -704us] +/-   44ms
-------------------------------

Are we missing something here?



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