Re: [chrony-users] Synchronizing clock with GPS with PPS |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-users Archives
]
- To: chrony-users@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: [chrony-users] Synchronizing clock with GPS with PPS
- From: Avamander <avamander@xxxxxxxxx>
- Date: Tue, 15 Sep 2020 17:53:36 +0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=eEY2PtilfZdV+cNUZg8fWmTTOTXjv/IPQfESYolq9mE=; b=I3eWRDVO4irmmhzWXLSVc3m/oNVPwsLz4W6J8PluLOilFsXZFOSbgVT17CA0eiWrgA 2K8fQakHRVKeVrf8Re1X/xp6hLzZ+W/9g/GbBctPHnZdefk/oLB3pqqUSDt9i0E2wTlB uTgHRnbPyfe73nRhjgiFoa4NI9lst0bY0taE1mG7yuNfQJgAQn5vZB6lCO6cNxGvhj/l 1y6dfARlPOqM1s+5ncjQ3qluZqNRn4G4nMkX2IP8sGoReJzW6imwPcujerr2+e71WgZO x/ShIAPUyJWaXtrp+t6ke+n59HfsB3MCq5t77Eo+HXvH3YN6/SayAfLX/hg7GeMYnaCp +OsQ==
> Finally, I read that using Unix sockets rather that shared memory is preferable, but my chronyd does not seem to create those sockets.
You need to check the AppArmor policies in-use. Broken gpsd ones were shipped to Ubuntu users, make sure gpsd has access to the chrony sockets and the pps device. If it doesn't it'll fail with a nondescript error or silently. Super annoying piece of software. PPS0 is also hardcoded in gpsd, the passed devices don't matter.
Then you need to make sure they're started in the right order for the socket method to work, chrony before gpsd if I remember correctly. Another point of pointless fragility in gpsd. SHMs work a bit better and then the order doesn't matter, again, check the AppArmor policy if they both can access the segments.
Oh and finally, it might take a bit of time before any readings appear in chrony. Both chrony and gpsd are annoyingly opaque about any potential problems in such a setup.
Hi all,
I am setting up chronyd on an embedded Linux device to synchronize the system clock using a GPS module. The GPS device sends NMEA strings over the character device /dev/ttyAMA1 and I have also configured /dev/pps0, both of which appear to be working OK.
The system is running Ubuntu 18.04 and the latest package versions are chronyd 3.2 and gpsd 3.17.
I configured gpsd to listen to the serial device and then added these lines to my chrony.conf:
refclock SHM 0 refid GPS precision 1e-1 offset 0.9999 delay 0.2
refclock PPS /dev/pps0 refid PPS
When I run `chronyc sources` they both seem to be kind of working:
210 Number of sources = 2
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
#- GPS 0 4 377 12 +128ms[ +128ms] +/- 200ms
#* PPS 0 4 377 12 +6ns[ +119ns] +/- 203ns
However it looks like the GPS source is “not combined”. Is this a degraded state, e.g., it is using one of these two sources?
Also, I am not sure why the LastRx from the PPS (or frankly either) ticks upwards so long—shouldn’t it constantly be receiving updates?
I am just using the precision / offset / delay figures that several examples use. Is there documentation on calibrating these values?
Finally, I read that using Unix sockets rather that shared memory is preferable, but my chronyd does not seem to create those sockets.
Thanks,
Ryan