ntpsec is ignoring PPS

folkert folkert at vanheusden.com
Tue Nov 30 18:37:03 UTC 2021


I have ntpsec running on a raspberry pi zero w:

root at gpsdomonitor:~# ntpd --version
ntpd ntpsec-1.2.0 2021-06-17T05:15:04Z


	driftfile /var/lib/ntpsec/ntp.drift

	server minpoll 1 maxpoll 4 prefer
	server minpoll 1 maxpoll 4 prefer

	pool nl.pool.ntp.org

	restrict -4 default kod notrap nomodify nopeer
	restrict -6 default kod notrap nomodify nopeer

	restrict ::1

	disable auth

	statsdir /var/log/ntpstats/
	statistics loopstats peerstats clockstats
	filegen loopstats file loopstats type day enable
	filegen peerstats file peerstats type day enable
	filegen clockstats file clockstats type day enable

It listens to two pps sources (so that I can crudely compare their ticks).

ntpd has them open:

root at gpsdomonitor:~# lsof -n | grep pps
ntpd      1022                   ntpsec    4u      CHR      241,0 0t0       8033 /dev/pps0
ntpd      1022                   ntpsec    5u      CHR      241,1 0t0       8035 /dev/pps1

and receives PPS events:

root at gpsdomonitor:~# strace -tt -fp 826 2>&1 | grep -i PPS
19:33:05.754863 ioctl(4, PPS_FETCH, 0xbef90af8) = 0
19:33:05.758057 ioctl(3, PPS_FETCH, 0xbef90af8) = 0

Data comes in close to each other.

Also when logging the local clock, /sys/devices/virtual/pps/pps0/assert
and /sys/devices/virtual/pps/pps1/assert I see (sane?) values:

1638292141.258095282 1638292141.000004819 1638292140.509518643
1638292142.302960010 1638292142.000012987 1638292141.509507810
1638292143.347188748 1638292143.000026159 1638292142.509522980

ntpq shows:

root at gpsdomonitor:~# ntpq -c pe -n
     remote           refid      st t when poll reach   delay   offset   jitter
oPPS(0)          .PPS.            0 l   12   16  377   0.0000  -0.0114   0.0040
xPPS(1)          .PPS.            0 l    1    2  377   0.0000 490.4861   0.0065
 nl.pool.ntp.org .POOL.          16 p    -   64    0   0.0000   0.0000   0.0019

PPS(0) is a regular garmin lvc18, while PPS(1) is a GPS disciplined
oscillator, this one: http://www.leobodnar.com/shop/index.php?main_page=product_info&cPath=107&products_id=234
The GPSDO emits a 10MHz signal that is divided to 1PPS using a "picdiv"
(http://www.leapsecond.com/pic/picdiv.htm ). As suggested by the
website, a 100nF capacitor has been connected.

So that works but PPS(1) shows an 'x' before it. I see a rather
(surprisingly) large offset but jitter is always low (less than 0.02).
The device shows a PLL and GPS lock.
I connected the picdiv (1pps) output to my hantek scope (the one with
display on your pc via usb) and could only see the falling flank which
looked sharp.

Most values on https://keetweej.vanheusden.com/ntpviz-gpsdo/day/ for
PPS(1) are us levels while those of PPS(0) are in ms range.
I did notice that the "skewness" (7.749e+09) and "Kurt-osis" values are
big: 1.533e+13. That is bad according to the description below it, but
what may cause it and what is it an indication of? That's basically my
question after this long text :-) What are these values, why are they
big and maybe someone knows if this gpsdo is maybe problematic?


More information about the users mailing list