[ntp:questions] NTP server with Garmin GPS 18 LVC

unruh unruh at invalid.ca
Mon Dec 16 18:05:53 UTC 2013

On 2013-12-16, Adrian P <ntp at pascalau.ro> wrote:
> Hi,
> In an old IBM thinkpad T22 laptop that runs FreeBSD 9.2, I have
> configured a NTP server that gets the PPS signal from a Garmin GPS 18
> LVC, as described here:
> http://www.satsignal.eu/ntp/FreeBSD-GPS-PPS.htm
> The /etc/ntp.conf contains the following generic NMEA GPS receiver
> driver configuration:
> server mode 1 minpoll 4 maxpoll 4 prefer
> fudge flag1 1 flag2 0 flag3 1 refid PPS
> I let it run for a few days, however I still have every now and then
> huge peaks (between -50 and +30 us) of the clock offset as seen in the
> following graph: http://goo.gl/JpSyeO
> So I am wondering:  why those repeating huge clock offsets? They
> allays starts with a negative peak, followed immediately by a positive
> one. Is this because of the faulty laptop internal clock, that drifts
> away with 30-40 us every now and then? Any thoughts?

It is hard to say, but it could be that the interrupt for the PPS is
delayed because of, say, disk activity which ties up the interrupts for
50us. The next one will of course occur on time ( ie 50us early with
respect to the previous interrupt). That may be what you are seeing. Are
you looking at the raw graphs of offset every second? The median filter
should remove those spikes. (it basically throws away about 40% of the
measurements that are furthest from the median in order to eliminate
"popcorn" events) so they should not affect your timing. 
Looking at your graph, the events are extremely regular. Unfortunately I
have no idea what the lower axis is. You claim seconds, but there are no
tick marks. Does that span represent a day, a year, a microsecond?

If it is say minutes or hours, then the decay suggests that the computer
say a huge spike for a relatively long time ( many seconds) responded by
changing the clock rate, and then that anomaly disappeared and it
relaxed back to its proper rate. 

> Many thanks,
> Adrian

More information about the questions mailing list