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

Dave Hart hart at ntp.org
Mon Feb 13 15:09:07 UTC 2012

On Sun, Feb 12, 2012 at 16:32, Ron Frazier (NTP)
<timekeepingntplist at c3energy.com> wrote:
> 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
>> 12 Feb 18:41:53 ntpdate[944]: Raised to realtime priority class
>> 12 Feb 18:42:01 ntpdate[944]: step time server offset
>> 1.305816 sec
> I tried ntpdate once or twice myself. Can't do that on Windows though, I
> think.

Take another look at the message you quoted.  While you can use
ntpdate on Windows, few do.  Unlike ntpd, ntpdate works only with the
low-precision system clock, so even if you start ntpd right after
running ntpdate, there can be substantial offset shown by ntpd due to
the quantization of ntpdate's time setting to a multiple of the native
clock precision, which could be as much as 15.6 msec.

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

ntpd will step the time at first sync if the offset is more than the
step threshold, default 128 msec.  Without -g, it will refuse to set
the clock if the offset is more than the panic threshold, default
1000s.  With -g, such a panic-exceeding step is allowed at first sync

> I read somewhere that you can do a one time step
> with NTPD, but I don't know how to do that on Linux.

I suspect you're referring to ntpd's "ntpdate mode", typically invoked
with ntpd -gq, or possibly ntpd -gqc \some\ntp.conf if your ntp.conf
isn't in the location ntpd looks by default, or if you want to use a
different configuration than normal daemon operation.

Dave Hart

More information about the questions mailing list