gpsd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-users] ntpd thrashing between gpsd sources


From: Nick Marinelli
Subject: [gpsd-users] ntpd thrashing between gpsd sources
Date: Fri, 28 Feb 2014 20:19:35 -0000

Greetings gpsd users,

  This is my first post to this list, and I can't seem to find a page of etiquette, so I apologize in advance for any blunders I make.

   I'm working on a system that has no internet connection, and will never have one, so the only source of time for the system is via gps. The gps unit I'm using is configured to send out NMEA sentences once every 2 seconds (I can increase or decrease this), and is sending a 1PPS ( it also supports 10pps) signal along both DCD (pin 1) and RING (pin 9) on the serial cable, which is plugged in via a serial to usb converter. As far as I can tell, kernal pps is not enabled, as the RHEL6 /boot/config file indicates PPS_CONFIG=m.

Sometimes ntpd syncs, but other times ntpd will thrash wildly between SHM(0), SHM(1), and claiming to be unable to reach any server at all. When in the state of it claiming not to be able to reach any servers, both SHM(0) and SHM(1) in the ntpq -p output have Xs next to them. Additionally, sometimes the PPS offset will randomly jump as high as  a negative second (~-0.999, as verified by gpsmon, and ntpq -p), but then return to a more reasonable level.  I can't seem to diagnose what is causing the thrashing, or the huge offset. 

Here's a snippet of my ntpd log file:
------------------------------------------------------------------------------------------------------------
28 Feb 12:32:47 ntpd[4201]: synchronized to SHM(1), stratum 0
28 Feb 12:33:05 ntpd[4201]: no servers reachable
28 Feb 12:33:45 ntpd[4201]: synchronized to SHM(0), stratum 0
28 Feb 12:34:28 ntpd[4201]: synchronized to SHM(1), stratum 0
28 Feb 12:34:34 ntpd[4201]: synchronized to SHM(0), stratum 0
28 Feb 12:35:31 ntpd[4201]: synchronized to SHM(1), stratum 0
28 Feb 12:35:41 ntpd[4201]: synchronized to SHM(0), stratum 0
28 Feb 12:36:06 ntpd[4201]: synchronized to SHM(1), stratum 0
28 Feb 12:36:22 ntpd[4201]: synchronized to SHM(0), stratum 0
28 Feb 12:37:03 ntpd[4201]: no servers reachable
28 Feb 12:37:13 ntpd[4201]: synchronized to SHM(1), stratum 0
28 Feb 12:37:28 ntpd[4201]: no servers reachable
28 Feb 12:38:03 ntpd[4201]: synchronized to SHM(1), stratum 0
28 Feb 12:38:21 ntpd[4201]: no servers reachable
28 Feb 12:38:44 ntpd[4201]: synchronized to SHM(1), stratum 0
28 Feb 12:39:47 ntpd[4201]: synchronized to SHM(0), stratum 0
28 Feb 12:39:53 ntpd[4201]: synchronized to SHM(1), stratum 0
28 Feb 12:40:04 ntpd[4201]: synchronized to SHM(0), stratum 0
28 Feb 12:40:25 ntpd[4201]: no servers reachable
28 Feb 12:40:40 ntpd[4201]: synchronized to SHM(1), stratum 0
28 Feb 12:40:56 ntpd[4201]: no servers reachable
28 Feb 12:41:27 ntpd[4201]: synchronized to SHM(1), stratum 0
28 Feb 12:41:42 ntpd[4201]: no servers reachable
28 Feb 12:42:37 ntpd[4201]: synchronized to SHM(1), stratum 0
28 Feb 12:42:52 ntpd[4201]: synchronized to SHM(0), stratum 0
28 Feb 12:42:52 ntpd[4201]: no servers reachable
28 Feb 12:43:07 ntpd[4201]: synchronized to SHM(1), stratum 0
------------------------------------------------------------------------------------------------------------

also,here's my ntp.conf (most commented lines removed):
======================================================
statsdir /var/log/ntpstats/
statistics peerstats
filegen peerstats file peerstats type day enable
driftfile /var/lib/ntp/drift
logfile /var/log/ntp.log

restrict 127.0.0.1 
server 127.127.28.0 minpoll 4 maxpoll 4
fudge 127.127.28.0 refid GPS

server 127.127.28.1 minpoll 4 maxpoll 4 prefer
fudge 127.127.28.1 refid PPS

includefile /etc/ntp/crypto/pw

# Key file containing the keys and key identifiers used when operating
# with symmetric key cryptography. 
keys /etc/ntp/keys
======================================================

After searching through the mailing list archives, my understanding is that gps isn't fantastic as a sole time source, so may have some inherent finickiness to it. If that's the case, I can learn to accept that, as long as there's some kind of ntp.conf tweak I can make to allow it to be more forgiving and shut up about unreachable servers. If there's a more legitimate fix, I'll be glad to take that as well. Any ideas?

I can also provide my ntpd and gpsd init.d scripts, and the ntpd peerstats log if need be.


Thanks so much!
Nicholas Marinelli



reply via email to

[Prev in Thread] Current Thread [Next in Thread]