From owner-freebsd-questions@FreeBSD.ORG Sat Mar 13 18:03:48 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AA0A106566C for ; Sat, 13 Mar 2010 18:03:48 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (gate6.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 6F9028FC0C for ; Sat, 13 Mar 2010 18:03:47 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.187.76.163]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.4/8.14.4) with ESMTP id o2DI3gnp028645 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 13 Mar 2010 18:03:42 GMT (envelope-from m.seaman@infracaninophile.co.uk) Message-ID: <4B9BD37E.1060801@infracaninophile.co.uk> Date: Sat, 13 Mar 2010 18:03:42 +0000 From: Matthew Seaman Organization: Infracaninophile User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-GB; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: =?UTF-8?B?0JDQvdGC0L7QvSDQmtC70LXRgdGB?= 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> In-Reply-To: <3f1c29e71003130647x8e78411w82fcdde6f1f78479@mail.gmail.com> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Scanned: clamav-milter 0.95.3 at happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_ADSP_ALL, SPF_FAIL autolearn=no version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on happy-idiot-talk.infracaninophile.co.uk Cc: RW , freebsd-questions@freebsd.org, "Randal L. Schwartz" Subject: Re: ntpdate problem X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Mar 2010 18:03:48 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 13/03/2010 14:47:31, Антон Клесс 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. 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. 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." > 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. 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. Just add the following to /etc/rc.conf: ntpd_enable="YES" ntpd_sync_on_start="YES" and run: /etc/rc.d/ntpd start Wait for about 15-30 minutes, then type 'ntpq -p', and you should see a report showing 3 servers, one of which should be marked with a '*' indicating you're synched correctly. That's all you need to do. You can edit /etc/ntp.conf if you prefer to use different servers to the automatically selected ones, or if you want to tweak any other NTP options. Note the 'offset' field in the report. That measures how far out your clock is from the time sources in /milliseconds/. Sub 10ms accuracy is fairly easy to achieve: which is much better than you can do via ntpdate. Also, the NTP algorithms adapt your clock over time to run more accurately and consequently can gradually decrease the frequency with which the upstream time sources are polled. Give it a day or so, and it should max out at polling each source only once every 1024 seconds. 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/ iEYEARECAAYFAkub034ACgkQ8Mjk52CukIyKFgCdGBN65guZxj8Sw3O1MSIRpPnr fwUAnRxmOOu9SDTFGofxK36b3yQu9TkF =9WWS -----END PGP SIGNATURE-----