[ntp:questions] how to force NTP to use GPS
Mark C. Stephens
marks at non-stop.com.au
Sun Feb 12 04:35:30 UTC 2012
I have seen that a lot lately, sometimes as much as 500m/s when restarted.
And then if you stop ntpd and restart a second time its all good again.
From: Ron Frazier (NTP) [mailto:timekeepingntplist at c3energy.com]
Sent: Sunday, 12 February 2012 10:57 AM
To: rgilbert88 at comcast.net
Cc: questions at lists.ntp.org
Subject: Re: [ntp:questions] how to force NTP to use GPS
On 02/11/2012 06:11 PM, Richard B. Gilbert wrote:
> On 2/11/2012 4:14 PM, Ron Frazier (NTP) wrote:
>> Hi all,
>> I now have my USB GPS working at an acceptable level on both Windows
>> and Linux using only NTPD. I have the GPS server line set as prefer,
>> but there are other server lines which poll the internet. Sometimes,
>> the system selects an internet clock rather than my GPS. How do I
>> force NTP to use my GPS if it's available, no matter what (within
>> reason). The only time I ever want it to select an internet server is
>> if the GPS fails or is not plugged in.
> ISTR a "prefer" keyword used to instruct NTPD to use a designated time
> source if that source is available. Other sources configured will be
> used only if the "preferred" source is not available or obviously
> insane. Or something like that! It goes in NTPD.CONF IIRC.
Hi Richard (and others),
Thanks for the note. I have prefer on my gps line in ntp.conf. I have to do more testing. I thought I saw it select another clock anyway some time during the day. I know the GPS was available at the time and it wasn't insane.
Also, something else strange just happened. I shut down NTPD for literally about only a minute to tweak the fudge factor in ntp.conf by about 5 ms. When I restarted it, the offset between the computer's clock and ALL my time sources including the GPS was about 160 ms. Before the shutdown, it was only about 2 ms. I don't think it should drift out 1/6 sec in one minute. I've restarted NTPD and I'll see what happens.
(PS - If you email me and don't get a quick response, don't be concerned.
I get about 300 emails per day from alternate energy mailing lists and such. I don't always see new messages very quickly. If you need a reply and have not heard from me in 1 - 2 weeks, send your message again.)
timekeepingdude AT c3energy.com
More information about the questions