[ntp:questions] "ntpd -q" is slow compared to ntpdate

eugenemil at sbcglobal.net eugenemil at sbcglobal.net
Wed Oct 15 12:10:59 UTC 2008

On Oct 14, 9:32 pm, Unruh <unruh-s... at physics.ubc.ca> wrote:
> eugene... at sbcglobal.net writes:
> >The following argument can be made in favor of running ntpd -gq:
> >Suppose you want to reduce the time offset to (nearly) zero as rapidly
> >as possible on start-up and this causes you to be dissatisfied with
> >the behavior of ntpd when it it starts up and calculates an initial
> >offset of slightly less than the default step threshold of 128ms.  If
> >you run "ntpd -g" with something like "tinker step 0.001" in the
> >configuration file to insure that a step will occur on start-up, then
> >you are stuck with that step threshold indefinitely. You might want to
> >run  ntpd twice -- the first time in "one-shot" mode with the tinker
> >in the config, and the second time with a different configuration file
> >lacking the tinker.
> >Gene Miller
> date -s "Jan 1 2000 10:15:00"
> ntpd -g
> should do it. the first ensures that the time is way way way off and a step
> will definitely occur. The
> second does a step to the correct time.

One minor addition would be required:  Before executing date, the
current date/time would have to be saved. A check would have to be
made to verify that ntpd found a suitable server for sync, and if that
failed, the previous time would have to be restored.

Gene Miller

More information about the questions mailing list