From owner-freebsd-questions@FreeBSD.ORG Thu Oct 12 13:51:27 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C6A0216A407 for ; Thu, 12 Oct 2006 13:51:27 +0000 (UTC) (envelope-from xfb52@dial.pipex.com) Received: from smtp-out4.blueyonder.co.uk (smtp-out4.blueyonder.co.uk [195.188.213.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 527C443D62 for ; Thu, 12 Oct 2006 13:51:26 +0000 (GMT) (envelope-from xfb52@dial.pipex.com) Received: from [172.23.170.136] (helo=anti-virus01-07) by smtp-out4.blueyonder.co.uk with smtp (Exim 4.52) id 1GY0y5-0002k4-3j; Thu, 12 Oct 2006 14:51:25 +0100 Received: from [80.192.24.203] (helo=[192.168.0.2]) by asmtp-out2.blueyonder.co.uk with esmtp (Exim 4.52) id 1GY0y4-0007bz-AG; Thu, 12 Oct 2006 14:51:24 +0100 Message-ID: <452E4859.6000705@dial.pipex.com> Date: Thu, 12 Oct 2006 14:51:21 +0100 From: Alex Zbyslaw User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-GB; rv:1.7.13) Gecko/20060515 X-Accept-Language: en MIME-Version: 1.0 To: Zbigniew Szalbot References: <20061011192435.N4855@192.168.11.51> <452D326A.2030304@dial.pipex.com> <20061011201811.O7568@192.168.11.51> <452D4D77.6010704@dial.pipex.com> <20061011235218.I13509@192.168.11.51> In-Reply-To: <20061011235218.I13509@192.168.11.51> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions Subject: Re: ntpd with flags in rc.conf 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: Thu, 12 Oct 2006 13:51:27 -0000 Zbigniew Szalbot wrote: > I have a question about ntpd. HOw is the time adjusted? Gradually over > time? Because I can see 30-second difference between my pc and FBSD > machine. Will it be minimized in the longer run? Thanks! You're best off directing followup questions back to freebsd-questions as you may well get answers quicker than if you just ask me! ntpd adjusts time slowly, but the -g option should make it set the time correctly when it starts from when it should keep in sync. Set --g in your ntpd_flags and then as root run sh /etc/rc.d/ntpd restart With -g it can still take a while (several minutes) before ntpd trusts its servers enough to set the time, Many people, I believe, use ntpdate to set the time once at startup and then use ntpd to keep it in sync. (Ignore the comment on the manual page for ntpdate about it being deprecated. It has said that for a long time and shows no sign of going away). I believe ntpdate will pick up servers from your ntpd.conf. The man page for ntpd has more info on how ntpd keeps the time, and also check out ntpdc which can show you what ntpd is doing (which servers it's using and stuff). When you say the time on your PC is 30 seconds different, do you mean a Windows pc? Maybe it's the one that's wrong, or maybe your local ntpd isn't finding any servers. As root: ntpdc -c dmpeers should get you a list of the servers ntpd is polling and a * shows the one it is currently trusting, if i recall. --Alex