[ntp:questions] Ignore one server except in extreme conditions?

Dave Hart hart at ntp.org
Thu Nov 17 07:02:00 UTC 2011

On Thu, Nov 17, 2011 at 06:51, A C <agcarver+ntp at acarver.net> wrote:
> On 11/16/2011 22:43, Dave Hart wrote:
>> On Thu, Nov 17, 2011 at 06:35, A C<agcarver+ntp at acarver.net>  wrote:
>>> I compiled the latest development version 4.2.7p234.  The NMEA driver
>>> does not pick up /dev/gpspps for whatever reason even if I have the
>>> symlink defined.
>> Did you try /dev/gpspps0, assuming server  Did you
>> "fudge flag1 1" to enable NMEA's PPSAPI support?
> Yeah, I did all that and it never worked.  It would not find and use the PPS
> signal.  But as soon as I split it to its own driver (and got the flags
> right on the PPS driver) it worked fine.

I can't see why not.  When /dev/gpsppsX can be opened, NMEA's PPSAPI
opens it and uses that device with PPSAPI using the same common PPSAPI
code as ATOM.  I am baffled.  If you add

logconfig =clockall +peerall +sysall +syncall
and possibly
logfile /some/path/to/ntpd.log

with the NMEA-only PPSAPI configuration, do you see a message logged
to syslog or ntpd.log including " flag1 1 but PPSAPI fails"?  If so,
try changing refclock_nmea.c as follows:

	pps_fd = open(device, PPSOPENMODE, S_IRUSR | S_IWUSR);

	if (-1 == pps_fd)
		pps_fd = pp->io.fd;

change the if block to:

	if (-1 == pps_fd) {
		pps_fd = pp->io.fd;
		msyslog(LOG_WARNING, "%s cannot open %s: %d %m",
			refnumtoa(&peer->srcadr), errno);

And try again, so we can narrow down the reason for the failure.

Thanks for you patience,
Dave Hart

More information about the questions mailing list