Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Mar 2010 19:08:38 +0000
From:      RW <rwmaillists@googlemail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: ntpdate problem
Message-ID:  <20100313190838.2197cdc8@gumby.homeunix.com>
In-Reply-To: <4B9BD37E.1060801@infracaninophile.co.uk>
References:  <3f1c29e71003120257h23ecc310w730bbc6396b27a37@mail.gmail.com> <795fc2b81003120622o2162463dv6697e26a86188cbe@mail.gmail.com> <20100312145405.742da070@gumby.homeunix.com> <3f1c29e71003120706q692fbc1cgebd2463dcf95b35d@mail.gmail.com> <20100312152732.377a92a2@gumby.homeunix.com> <86r5npun1e.fsf@blue.stonehenge.com> <3f1c29e71003130647x8e78411w82fcdde6f1f78479@mail.gmail.com> <4B9BD37E.1060801@infracaninophile.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 13 Mar 2010 18:03:42 +0000
Matthew Seaman <m.seaman@infracaninophile.co.uk> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>=20
> On 13/03/2010 14:47:31, =D0=90=D0=BD=D1=82=D0=BE=D0=BD =D0=9A=D0=BB=D0=B5=
=D1=81=D1=81 wrote:
> > I saw that more than year ago on my teacher's server, when I was
> > deal with my first FreeBSD, so it's just a kind of habit.
>=20
> It's a bad habit you should try and cure yourself of.  Stepping the
> clock with ntpdate(8) can cause nasty effects like time apparently
> going backwards -- and that will seriously upset a lot of software.
>=20
> Also, it doesn't account for the natural clock drift of your system,
> so it's going to give you pretty terrible accuracy -- probably good
> to no more than a few seconds.  ntpdate(8) is really only intended to
> get the clock into the right ballpark at system boot so that ntpd(8)
> has a fighting chance of getting into synch.  The NTP project has
> deprecated ntpdate(8) for some time now, and instead prefers adding
> an option to ntpd(8) to say "set the clock on initial startup no
> matter how far out it is."
>=20
> > But on the other hand, if it exists, it could work properly, and I
> > am interested in just to understand, how it should be set up.
>=20
> I'm assuming you're on some sort of always-on network, like ADSL?
> Most people are nowadays.  In which case, there's really no reason
> not to run ntpd(8) the way it is intended to be used.
>=20
> Just add the following to /etc/rc.conf:
>=20
> ntpd_enable=3D"YES"
> ntpd_sync_on_start=3D"YES"
>=20



  ntpd_sync_on_start=3D"YES"

is not a complete substitute for running ntpdate at startup. It allows
ntpd to make a large correction, but it doesn't block the boot sequence
so you could still get a large step-change later-on when your daemons
are starting-up.=20

ntpd has an option to emulate ntpdate, but it holds-up the
boot-sequence much longer - presumably this is why ntpdate has been
deprecated for a long time but hasn't yet gone away.=20

you can run ntpdate at boot with

   ntpdate_enable=3DYES

the rc script gets the servers from ntp.conf



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