"ntpdate" versus "ntpd"

Rick Stevens rstevens at vitalstream.com
Fri Jan 30 19:57:41 UTC 2004


Robert P. J. Day wrote:
> 
> -----Original Message-----
> From: Rick Stevens <rstevens at vitalstream.com>
> Sent: Jan 30, 2004 12:29 PM
> To: fedora-list at redhat.com
> Subject: Re: "ntpdate" versus "ntpd"
> 
> 
>>"ntpd -q" should do the same thing as "ntpdate".  Of course, a simple
>>scan of the man page would have revealed this.
> 
> 
> i really hate it when i have to prove that i'm not as dumb as i sound.
> as i'm sure i mentioned in a previous posting, "ntpd -q" does *not* have
> the same behaviour as "ntpdate".

I didn't mean to sound as if I were criticizing you.  Your surmise is
correct.  "ntpd -q" is the same as running ntpd with the "iburst" config
option.  It does have the effect of dragging the clock into sync when
it's way off, which is what ntpdate does/did.

> ntpdate works immediately, as far as i can tell.  from reading the man
> page (and from personal experimentation), "ntpd -q" does *not* work
> immediately.  it may very well work at the next sync event, but that
> does not necessarily mean immediately.

You're right, ntpdate works immediately.  It does its thing in a
different way than ntpd does by fetching the current time and doing a
"settimeofday()".  ntpd uses the adjtimex() mechanism and brings the
clock into sync slowly.

> all i'm asking is if there is an invocation of ntpd that emulates the 
> clearly deprecated ntpdate utility.  if not, that's cool, i can live with
> it.  but please don't suggest i go RTFM when i have obviously done
> that, referred to it, and pointed out that it's not quite the same.

The answer to your question is "no".  There is no invocation of ntpd
that will bring the clock into sync immediately as ntpdate does.  Sorry.
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-    Working with Linux is like wrestling with a worthy opponent.    -
-   Working with Windows is like picking on an annoyed child with a  -
-                            loaded handgun.                         -
----------------------------------------------------------------------





More information about the fedora-list mailing list