[ntp:questions] PPS indication in ntpq

Dave Hart hart at ntp.org
Tue Aug 2 22:43:25 UTC 2011


2011/8/2 Miguel Gonçalves <mail at miguelgoncalves.com>:
> I figured I was using different versions of NTP:
>
> - 4.2.4p5 (FreeBSD 7.4) on the one that was not seeing the PPS: I was
> only using the NMEA driver and I should have also added the PPS
> driver.
>
> - 4.2.6p2 (FreeBSD 7.4 but compiled through ports) on the one that was
> seeing the PPS: I had to use 4.2.6p2 so I could select 9600 bps.
>
> Through a series of mistakes I found out (with your help) that ntpq
> should report 'o' instead of '*'. So the correct one was the 4.2.6p2
> one! :-)

Actually both were seeing the PPS signal from the start, or else you
would not have been seeing offsets in the low microseconds on both.
ntpd 4.2.4 never uses the 'o' tally code, PPS or not, you will see *
for the controlling peer.  With 4.2.6, you will see tally code 'o' for
the controlling PPS, and you can also see '*' at the same time on
another refclock that is "numbering the seconds" for the PPS, though
not in your original configuration where a single NMEA driver is both
numbering the seconds and providing the PPS, for that configuration
you will see 'o' on NMEA once the PPS is engaged.

You do not need to configure a separate PPS driver, and are probably
best off to not.  If you do, change the NMEA flag1 to 0 so it will not
also attempt to process the PPS.

Note the 'o' tally only appears when ntpd is talking directly to the
PPSAPI interface.  A common configuration on Linux systems puts gpsd
in the middle, and provides the GPS and PPS information via a shared
memory driver to ntpd.  In that case, the selected refclock never will
show 'o' regardless of ntpd version, because ntpd is not using PPSAPI.
 The gpsd approach has the upside of letting you use the GPS from
other programs at the same time as ntpd, and also does not require
PPSAPI support, which mainstream Linux hasn't had until very recently.
 The downside is the PPS is being timestamped in
preemptively-scheduled gpsd code, rather than in an interrupt handler,
so the PPS timestamps are noisier with gpsd compared to direct PPSAPI
from ntpd.

Cheers,
Dave Hart



More information about the questions mailing list