From owner-freebsd-questions@FreeBSD.ORG Fri Apr 14 16:06: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 C6F9316A403 for ; Fri, 14 Apr 2006 16:06:27 +0000 (UTC) (envelope-from wmc20@xxiii.com) Received: from imf24aec.mail.bellsouth.net (imf24aec.mail.bellsouth.net [205.152.59.72]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5576643D46 for ; Fri, 14 Apr 2006 16:06:27 +0000 (GMT) (envelope-from wmc20@xxiii.com) Received: from ibm68aec.bellsouth.net ([68.209.177.221]) by imf24aec.mail.bellsouth.net with ESMTP id <20060414160625.XFLH26874.imf24aec.mail.bellsouth.net@ibm68aec.bellsouth.net> for ; Fri, 14 Apr 2006 12:06:25 -0400 Received: from wcox.bellsouth.net ([68.209.177.221]) by ibm68aec.bellsouth.net with ESMTP id <20060414160624.QIXU3111.ibm68aec.bellsouth.net@wcox.bellsouth.net>; Fri, 14 Apr 2006 12:06:24 -0400 Message-Id: <6.2.3.4.2.20060414115321.02e7f110@mailsvr.xxiii.com> X-Mailer: QUALCOMM Windows Eudora Version 6.2.3.4 Date: Fri, 14 Apr 2006 12:07:13 -0400 To: freebsd@dfwlp.com,freebsd-questions@freebsd.org From: wc_fbsd@xxiii.com In-Reply-To: <5507.208.11.134.3.1145029242.squirrel@mail.dfwlp.com> References: <5507.208.11.134.3.1145029242.squirrel@mail.dfwlp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: Proper Method of Time Sync? 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: Fri, 14 Apr 2006 16:06:28 -0000 At 11:40 AM 4/14/2006, Jonathan Horne wrote: >i have read about 2 methods to sync the time on a freebsd box. >...i have a workstation and a server, which i originally did method >1 on, but soon enough, time drifted quite a bit. so i switched it >to the 2nd method, and they appear to be sync'd perfectly. a third >box i set up, i did only method 2, and this one did not stay synced >at all. after i manually ran 'ntpdate -v -b us.pool.ntp.org', this >box straightend up. First off, ntpdate is obsolete, and will be retired "sometime in the future". Its functionality has been incorporated into ntpd. I think your problem is a limit in ntpd that's enabled by default. There is a limit on how large a correction ntpd will make at one time, even at boot up. ntpdate isn't that picky and always just syncs, even if the offset is large. Try some rtfmp on ntpd, ntpdate and ntpd.conf. I run ntpd on one server, with a flag (-g) set to always sync, eg: rc.conf: ntpd_sync_on_start="YES" # Sync time on ntpd startup, even if offset is high ntpd_flags="-A -p /var/run/ntpd.pid" And ntp.conf: server rolex.usg.edu driftfile /etc/ntp.drift logfile /var/log/ntpd.log restrict 208.62.177.32 mask 255.255.255.224 nomodify notrap My other servers and desktops are similarly configured, but sync off the first server. Be sure to specify the driftfile; ntpd will "learn" how fast or slow your clock is and record it, so it can apply corrections when/if an internet connection isn't up. Be sure the file exists and has some number. You can initialize with: echo "0" > /var//db/ntp.drift