[ntp:questions] ntpd -gq VS ntpdate -B

Tom Smith smith at cag.zko.hp.com
Wed Apr 11 14:39:09 UTC 2007


"ntpdate -b" steps the time after doing a quick look at set of
candidates you have specified on the command line. It is what
is normally recommended for a boot sequence prior to starting ntpd.

"ntpdate -B" slews the time, but is otherwise the same. Not
usually recommended for a boot sequence because the initial
time setting isn't complete when it exits.

"ntpd -gq" uses all the convergence rules of the normal
ntpd against a list of servers specified in a separate
configuration file. After selecting a peer, it will either
step OR slew the time, depending on the magnitude of
the offset, and the time adjustment may or may not be
complete when it exits. It is not equivalent to either
"ntpdate -b" or "ntpdate -B".

ntpdate takes a few milliseconds to run (dependent on
network delays and timeouts) and sets the clock typically
within a few milliseconds of "correct" with respect to
the servers you have chosen to use. "ntpd -gq" takes a minimum
of a few seconds to reach convergence and produces about the
same practical level of accuracy. In steady state, ntpd,
of course, is much more accurate and less disruptive than
repeated use of ntpdate.

-Tom

castellani.riccardo at tiscali.it wrote:
> I know ntpdate is deprecated but I'm interesting to know if they work 
> in the same way, is ntpdate behavior different in comparison to ntpd ?
> 
> ----Messaggio originale----
> Da: stenn at ntp.isc.org
> Data: 11/04/2007 1.43
> A: <questions at lists.ntp.isc.org>
> Ogg: Re: [ntp:questions] ntpd -gq VS ntpdate -B
> 
>>>> In article <1176216808.517213.274790 at w1g2000hsg.googlegroups.com>, 
> "RICCARDO" <castellani.riccardo at tiscali.it> writes:
> 
> RICCARDO> If I use ntpd -gq in my client I should adjust time to 
> little
> RICCARDO> steps using adjtime system call, but what's difference with
> RICCARDO> "ntpdate -B" ?
> 
> ntpdate is being deprecated.
> 
> ntpd -gq will set the time and exit.  If the difference is less than 
> 128ms
> the time will be slewed, if the difference is more the clock will be
> stepped.
> 
> H
> 
> _______________________________________________
> questions mailing list
> questions at lists.ntp.isc.org
> https://lists.ntp.isc.org/mailman/listinfo/questions
> 
> 
> 
> 
> Naviga e telefona senza limiti con Tiscali     
> Scopri le promozioni Tiscali adsl: navighi e telefoni senza canone Telecom
> 
> http://abbonati.tiscali.it/adsl/
> 
> _______________________________________________
> questions mailing list
> questions at lists.ntp.isc.org
> https://lists.ntp.isc.org/mailman/listinfo/questions
> 




More information about the questions mailing list