Getting SOCK working with gpsd
I'm unable to get chronyd to see gpsd SOCK. I got it seeing the PPS off the serial, so its running ntpd and PPS, just the SOCK isn't being detected.
It does have firewall and selinux on, but I've tried permissive and firewalld off makes no difference.
/etc/sysconfig/gpsd
OPTIONS="-n -G /dev/ttyS0"
Set to 'true' to add USB devices automatically via udev
USBAUTO="true"
/etc/chrony.conf (added part for gpsd)
SHM0 from gpsd is the NMEA data at 4800bps, so is not very accurate
refclock SHM 0 refid GPS precision 1e-1 offset 0.9999
#
PPS is from the /dev/pps0 device. Note that
chronyd creates the /var/run/chrony.ttyS1.sock device, but
gpsd creates the /dev/pps0 device
openrc rules start gpsd /after/ chronyd, so /dev/pps0
is not created until after chronyd is started
If you want to use pps0, either edit the openrc rules
or add this source after gpsd is started
#
refclock PPS /dev/pps0 refid PPS precision 1e-7
#
SOCK protocol also includes PPS data and
it also provides time within a few ns
refclock SOCK /var/run/chrony.ttyS0.sock delay 0.0 refid SOCK
Result of chronyc sources
chronyc sources
MS Name/IP address Stratum Poll Reach LastRx Last sample
x GPS 0 4 377 22 -922ms[ -922ms] +/- 100ms
x PPS 0 4 377 20 +203ms[ +203ms] +/- 34us
? SOCK 0 4 0 - +0ns[ +0ns] +/- 0ns
^+ time-d-b.nist.gov 1 10 377 1102 +450us[ -168us] +/- 39ms
^- clock.isc.org 3 10 377 662 -4362us[-4362us] +/- 115ms
^+ clock.nyc.he.net 1 10 377 515 -239us[ -239us] +/- 41ms
^- tick.eoni.com 3 10 377 142 +200us[ +200us] +/- 176ms
^+ time.cloudflare.com 3 10 377 732 -2672us[-2672us] +/- 39ms
^- ntp32.kashra-server.com 2 10 376 47m -5821us[-6389us] +/- 122ms
^- tick.chi1.ntfo.org 3 10 367 187 -1031us[-1031us] +/- 100ms
^+ ntp2.wiktel.com 1 10 377 800 +312us[ +312us] +/- 42ms
^+ time.nullroutenetworks.c> 2 10 377 656 -1408us[-1408us] +/- 38ms
^+ ntp.xtom.com 2 10 377 755 -1017us[-1017us] +/- 56ms
^- ntpool1.603.newcontinuum> 2 10 11 25m -1470us[-2075us] +/- 136ms
^+ li1210-167.members.linod> 2 10 377 710 -224us[ -224us] +/- 58ms
^+ los-angeles.ca.us.logipl> 2 10 377 109 +1434us[+1434us] +/- 29ms
^- ntp1.wiktel.com 1 10 377 711 +9060us[+9060us] +/- 50ms
^+ time.cloudflare.com 3 10 377 1015 -2065us[-2684us] +/- 38ms
^* clock.sjc.he.net 1 10 365 994 -749us[-1370us] +/- 15ms
^- ntp01.nonexiste.net 1 10 377 29m -12ms[ -12ms] +/- 65ms
^+ ntp1.glypnod.com 2 10 377 391 -2345us[-2345us] +/- 24ms
^- 45.32.87.134.vultruserco> 2 10 377 856 +977us[ +977us] +/- 81ms
^- 2001:559:2be:3::1001 2 10 377 364 -1871us[-1871us] +/- 56ms
^- 167-248-49-102.oa02.lnk0> 2 10 377 726 +119us[ +119us] +/- 77ms
^- _gateway 2 6 377 63 -1810us[-1810us] +/- 75ms
^- 10.11.1.1 2 6 377 18 -1756us[-1756us] +/- 75ms
^- 192.5.41.40 1 10 377 824 -361us[ -361us] +/- 51ms
^- 192.5.41.41 1 10 377 702 -134us[ -134us] +/- 50ms
Its not detecting the SOCK.
Any one running gpsd as a NTP server?
Cheers,
David