Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Oct 2007 02:13:41 +0100
From:      RW <mlt01@mlists.homeunix.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: using the date command
Message-ID:  <20071001021341.5719168b@gumby.homeunix.com.>
In-Reply-To: <6852662bd22e8de7aa12336ea1404a67@prodigy.net>
References:  <5e433b6210a52ae0220ae0a20d0353e1@prodigy.net> <1191124332.5997.21.camel@new-host> <46FF54E5.4020502@cran.org.uk> <6852662bd22e8de7aa12336ea1404a67@prodigy.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 30 Sep 2007 16:17:30 -0700
jekillen <jekillen@prodigy.net> wrote:

> 
> On Sep 30, 2007, at 12:48 AM, Bruce Cran wrote:

> > ntpdate is deprecated, you should use "ntpd -q" instead if you want 
> > ntpd to set the time once then exit.  From ntpdate(8):
> >
> > Note: The functionality of this program is now available in the
> > ntpd(8) program.  See the -q command line option in the ntpd(8)
> > page. After a
> >     suitable period of mourning, the ntpdate utility is to be
> > retired from
> >     this distribution.
> >
> > Also, ntpd wil refuse to update the time if the delta is more than 
> > 1000s by default, but you can use the -g option to override this.
> > To set the date to within a reasonable delta, use something like
> > "date 200709282027".  If you want to set the time more accurately
> > using NTP, edit /etc/ntp.conf and add "server pool.ntp.org" to it.
> > Save it then run "ntpd -q". 

And if you then add 

ntpd_enable=YES
ntpdate_enable=YES

to rc.conf, it will all work automatically thereafter. ntpdate will run
at boot-time followed by ntpd. 

The removal of ntpdate is something I'll believe in when it happens.
ntpd -q is a superior drop-in replace for ntpdate when it's being run
from cron. OTOH if you run ntpd -q in place of ntpdate at boot (before
starting ntpd), it adds about 15 seconds to the boot-time for no
significant benefit.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071001021341.5719168b>