Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Mar 2010 20:22:45 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        RW <rwmaillists@googlemail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: ntpdate problem
Message-ID:  <4B9BF415.4030006@infracaninophile.co.uk>
In-Reply-To: <20100313190838.2197cdc8@gumby.homeunix.com>
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> <20100313190838.2197cdc8@gumby.homeunix.com>

next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 13/03/2010 19:08:38, RW wrote:
>   ntpd_sync_on_start="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. 

Been there, done that and spent many hours cursing dovecot, which just
dies on its arse if the clock does anything it doesn't approve of -- the
biggest flaw in an otherwise excellent program IMHO.

> 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. 

There's a trick that can be used to get round this, which is to use the
iburst option within ntp.conf.  Some NTP servers don't like having it
used against them, and will refuse to serve you, but you only need it on
one or two of the server lines in your config file.  Eg:

server   time.example.com iburst maxpoll 10
restrict time.example.com nomodify nopeer noquery notrap

(The restrict line is an example of good practice, but strictly
irrelevant to this argument.)

iburst speeds up the initial synchronisation by sending a sequence of 8
query packets at 2 second intervals, rather than the standard 64s
between packets you get otherwise.  With this in place I've never had a
problem with the clock being stepped after the rest of the system is up
and causing mayhem for other programs, nor have I needed to run
ntpdate(8) -- it even seems to work for virtual machines that can end up
missing many hours when the lappy goes to sleep.

	Cheers,

	Matthew

- -- 
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
                                                  Kent, CT11 9PW
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkub9BUACgkQ8Mjk52CukIzOfQCbBJfVvtj7gnwwGztSwYZW5HYs
khAAn2Y20P6zl54+7WK+KdM3jlrzIbA4
=QYrF
-----END PGP SIGNATURE-----



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