Date: Thu, 12 Oct 2006 14:51:21 +0100 From: Alex Zbyslaw <xfb52@dial.pipex.com> To: Zbigniew Szalbot <zbyszek@szalbot.homedns.org> Cc: freebsd-questions <freebsd-questions@freebsd.org> Subject: Re: ntpd with flags in rc.conf Message-ID: <452E4859.6000705@dial.pipex.com> In-Reply-To: <20061011235218.I13509@192.168.11.51> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?452E4859.6000705>