[ntp:questions] how to force NTP to use GPS

Ron Frazier (NTP) timekeepingntplist at c3energy.com
Sun Feb 12 16:32:02 UTC 2012


Hi Mark,

I tried ntpdate once or twice myself. Can't do that on Windows though, I 
think. On Windows, the GPSInfo program I use to program the GPS has an 
option to set the time to GPS time. Aren't they getting rid of ntpdate? 
It's still on my system though. By the way, according to man ntpdate, 
the -b is the default option, so you don't have to add it. I noticed 
you're hitting a local address. External time servers work too, although 
perhaps not as accurate. If you're using a GUI, like GNOME, you can go 
into the time settings screen and set the time by hand. There is a delay 
once you hit the mouse for the system to register the time. I got mine 
within 1/2 second the other day by looking at my (atomic) watch and 
clicking the mouse. My NTPD is set to start up with -g, which steps the 
time on startup if it's 1000 secs off. So, you can always set the time 
manually 20 min off with the GUI, then start NTPD. That's a bit messy 
though, and it still doesn't always get really tight time at first. I 
read somewhere that you can do a one time step with NTPD, but I don't 
know how to do that on Linux.

Sincerely,

Ron


On 02/12/2012 02:43 AM, Mark C. Stephens wrote:
> Wow I just stopped ntpd and restarted, 1.3 seconds that time!
>
> I just bring it back with ntpdate...
>
> C:\Program Files\NTP\bin>ntpdate -b 192.168.5.112
> 12 Feb 18:41:53 ntpdate[944]: Raised to realtime priority class
> 12 Feb 18:42:01 ntpdate[944]: step time server 192.168.5.112 offset 1.305816 sec
>
>
> Mark
>
> -----Original Message-----
> From: Mark C. Stephens
> Sent: Sunday, 12 February 2012 3:36 PM
> To: 'Ron Frazier (NTP)'; rgilbert88 at comcast.net
> Cc: questions at lists.ntp.org
> Subject: RE: [ntp:questions] how to force NTP to use GPS
>
> 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.
>
> Weirdness...
>
>
>
> -----Original Message-----
> 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.
>>>
>>> Sincerely,
>>>
>>> Ron
>>>
>>>        
>> 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.
>
> Sincerely,
>
> Ron
>
> --
> (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.)
>
> Ron Frazier
> timekeepingdude AT c3energy.com
>
>
>
>
>    

-- 

(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.)

Ron Frazier
timekeepingdude AT c3energy.com



More information about the questions mailing list