Re: [chrony-users] gpsd with no rtc and no network |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-users Archives
]
William G. Unruh __| Canadian Institute for|____ Tel: +1(604)822-3273
Physics&Astronomy _|___ Advanced Research _|____ Fax: +1(604)822-5324
UBC, Vancouver,BC _|_ Program in Cosmology |____ unruh@xxxxxxxxxxxxxx
Canada V6T 1Z1 ____|____ and Gravity ______|_ www.theory.physics.ubc.ca/
On Mon, 12 Dec 2016, Miroslav Lichvar wrote:
On Thu, Dec 08, 2016 at 04:47:03AM +0000, Brian Kuschak wrote:
I'm trying to set up something simple. I want chrony to grab NMEA time as soon as it's available, and then sync to PPS. This system (BBB) has no battery-backed RTC and no network access.
When the time is initially correct (set via NTP when connected to network), chrony seems to work, and locks to PPS. But when it powers up with a default date of 2000, it never syncs after getting GPS lock.
It seems to step once, to the bogus RTC time. But then it never steps to NMEA time.
If you do not have any RTC directives in chrony.conf (including no rtc file)
it should not be looking to rtc for anything. So that may be a bogus time
being sent by gpsd, or something else. As Lichvar says, use the -s option.
Then it will be out by min/hours/days, not years or centuries, depending on
when you last ran chrony.
What is the output of the refclock log file when it starts? That should tell
whether the system really is getting such wrong information, or if somehow
chrony is reading the SHM badly.
How soon after boot up is chrony started? Is gpsd running at that time and
filling up the shm (I think you said you were getting the time from an shm.)
Also, is there some way of getting gpsd to output the time during the startup
period to see if there is something funny going on there.
I am also trying to remember-- does the shm truncate the most significant bits
of the time. For the full time to ns, one would need about 64 bits. Is the shm
time slots big enough to hold the full time?
From the log it looks like it's actually the NMEA source what is wrong
and from the date (22 Aug 1998) it's probably something related to
the GPS week rollover. After the initial step there are other steps,
so maybe gpsd or GPS gets into some weird state, which breaks PPS. Do
you have the latest gpsd and GPS firmware?
It might help us to see the "-d -d" output.
If you add the -s option, chronyd should set the system time on start
to the last modification time of the driftfile, and this might avoid
the gpsd/GPS bug. But I'd be curious to know what exactly is
happening.
root@beaglebone:~# chronyd -d
2000-01-01T00:01:29Z chronyd version 2.4 starting (+CMDMON +NTP +REFCLOCK +RTC -PRIVDROP -SCFILTER -SECHASH +ASYNCDNS +IPV6 +DEBUG)
2000-01-01T00:01:29Z Setting filter length for PPS to 1
2000-01-01T00:01:29Z Setting filter length for NMEA to 2
2000-01-01T00:01:29Z Frequency -40.366 +/- 234.206 ppm read from /var/lib/chrony/chrony.drift
2000-01-01T00:01:29Z Using right/UTC timezone to obtain leap second data
2000-01-01T00:01:36Z Selected source NMEA
2000-01-01T00:01:36Z System clock wrong by -11404807.817246 seconds, adjustment started
1999-08-22T00:01:28Z System clock was stepped by -11404807.817246 seconds
1999-08-22T00:01:55Z Can't synchronise: no selectable sources
1999-08-22T00:02:00Z Selected source NMEA
1999-08-22T00:02:02Z System clock wrong by -0.029797 seconds, adjustment started
1999-08-22T00:02:04Z System clock wrong by 0.020517 seconds, adjustment started
1999-08-22T00:02:15Z RTC wrong by 11404807.787 seconds (step)
1999-08-22T00:02:15Z Could not set RTC time
1999-08-22T00:02:18Z Can't synchronise: no selectable sources
1999-08-22T00:02:36Z Selected source NMEA
1999-08-22T00:02:36Z System clock wrong by 361331.850290 seconds, adjustment started
1999-08-26T04:24:48Z System clock was stepped by 361331.850290 seconds
1999-08-26T04:24:50Z Can't synchronise: no selectable sources
1999-08-26T04:25:10Z RTC wrong by 11043475.933 seconds (step)
1999-08-26T04:25:10Z Could not set RTC time
--
Miroslav Lichvar
--
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.
--
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.