ntpsec is ignoring PPS

Gary E. Miller gem at rellim.com
Tue Nov 30 19:37:08 UTC 2021


Yo folkert!

On Tue, 30 Nov 2021 19:37:03 +0100
folkert via users <users at ntpsec.org> wrote:

> I have ntpsec running on a raspberry pi zero w:

If you were on gpsd-users at nongnu.org, you would see this exact
same conversation played out every week.

First. please read:

https://gpsd.io/gpsd-time-service-howto.html

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

A tad old, but not too bad.

> /etc/ntpsec/ntp.conf:
> 
> 	driftfile /var/lib/ntpsec/ntp.drift
> 
> 	server 127.127.22.0 minpoll 1 maxpoll 4 prefer
> 	server 127.127.22.1 minpoll 1 maxpoll 4 prefer

You have 2 PPS?  Odd.

minpoll 1 is too small.  minpoll 3 o4 4 is better.

> 	pool nl.pool.ntp.org

If you look below, you see this is not working.  It should put 4
pool servers into your chimers.

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

Um.  Wait?  Your 127.127.22. 0 and .1 are sepecate PPS?  You should have
led with that.

> ntpd has them open:
> root at gpsdomonitor:~# lsof -n | grep pps

OK.

> 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

That proves little.  What does this show?

    # ppstest /dev/pps0
    # ppstest /dev/pps1

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

That is doing things the hard way.

> ntpq shows:

You'll find ntpmon is easier to use than ntpq for things like this.

> root at gpsdomonitor:~# ntpq -c pe -n
> nl.pool.ntp.org .POOL.          16 p 64    0   0.0000   0.0000   0.0019

Your pool is not working.  You are getting nothing.  As the doc
I mentioned forst makes clear: ntpd is a cluster protocol.  ntpd
does not work with only 2 sources.  It needs at least 3 (monsane) to
allow voting to work.

> PPS(0) is a regular garmin lvc18, while PPS(1) is a GPS disciplined
> oscillator, this one:

You prolly should of led with that.  The garmin is old and you can get
way better receivers now for under $20.  But, as you showed, they are
working as expected.

But since you do not meet the minsane minimum, ntpd is doing nothing,
waiting for you to add servers.

You need to carefullly read and understand this part:

https://gpsd.io/gpsd-time-service-howto.html#_feeding_ntpd_from_gpsd

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 851 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/users/attachments/20211130/e528fcd0/attachment.bin>


More information about the users mailing list