"ntpdate" versus "ntpd"
bear at amberorder.com
bear at amberorder.com
Fri Jan 30 17:52:40 UTC 2004
> -----Original Message-----
> From: fedora-list-admin at redhat.com
> [mailto:fedora-list-admin at redhat.com] On Behalf Of Robert P. J. Day
> Sent: Friday, January 30, 2004 9:17 AM
> To: fedora-list at redhat.com
> Subject: "ntpdate" versus "ntpd"
>
> (sorry i can't respond directly to alexander dalloz's
> posting, i have to do it through a web browser. some day,
> i'll get this figured out.)
>
> i can sympathize with alexander's question -- ntpd is
> clearly a daemon, while ntpdate is a one-time "call and run"
> tool as he puts it. but if you look at the man page for
> ntpdate under FC1, it states right up front that ntpdate
> functionality is now available in ntpd, and ntpdate will
> eventually be retired from the distro "after a suitable
> period of mourning."
>
> fair enough. but this raises the obvious question -- is
> there a way to invoke "ntpd" to emulate nptdate's one-time,
> sync-my-clock-RFN!!
> behaviour, strictly from the command line, without resorting
> to messing with /etc/ntp.conf?
>
> i mean, this seems to be a fair question -- if i fire up my
> laptop, and it's on the net, how can i sync it with a
> well-known NTP server if i have access only to ntpd, and not ntpdate?
>
> i suspect it's time to pore over the docs at www.ntp.org,
> just to clarify all of this in my own mind.
>
> rday
I read some of the replies here, and tried the 'ntpd -q' method, which seems
to hang for more than the expected amount of time. One item worth noting is
"ntpd -q" (rightfully) complains that the socket for port 123 is in use if
the ntpd process is already running.
Some time ago I started googling into NTP to find the answer to your
question, and only came up with a sort of "lesser of two evils":
service ntpd stop && ntptimeset -s && service ntpd start
As expected, "ntptimeset -s" would also complain about the in-use socket if
the daemon is already running. It also uses the existing ntp.conf for time
sources.
John Stroud
<Insert some clever sig here.>
More information about the fedora-list
mailing list