From owner-freebsd-questions@FreeBSD.ORG Mon Apr 20 17:23:01 2009 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 22B8E106564A for ; Mon, 20 Apr 2009 17:23:01 +0000 (UTC) (envelope-from sonicy@otenet.gr) Received: from kane.otenet.gr (kane.otenet.gr [83.235.67.31]) by mx1.freebsd.org (Postfix) with ESMTP id 85BB58FC0A for ; Mon, 20 Apr 2009 17:23:00 +0000 (UTC) (envelope-from sonicy@otenet.gr) Received: from atlantis.dyndns.org (athedsl-4471176.home.otenet.gr [94.71.121.120]) by kane.otenet.gr (8.13.8/8.13.8/Debian-3) with ESMTP id n3KHMw1k004925; Mon, 20 Apr 2009 20:22:58 +0300 Message-ID: <49ECAF6D.2010204@otenet.gr> Date: Mon, 20 Apr 2009 20:22:53 +0300 From: Manolis Kiagias User-Agent: Thunderbird 2.0.0.21 (X11/20090414) MIME-Version: 1.0 To: Jon Radel References: <7AF4EC3FE1B54A2DB854159E1D6D6715@lisac> <49ECAD89.5040302@radel.com> In-Reply-To: <49ECAD89.5040302@radel.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org, Lisa Casey Subject: Re: ntp 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: Mon, 20 Apr 2009 17:23:01 -0000 Jon Radel wrote: > Lisa Casey wrote: >> Hi, >> >> Running FreeBSD 5.3 IN /etc/ntp.conf I have: >> >> server time.nist.gov prefer >> server tock.gpsclock.com >> driftfile /etc/ntp.drift >> logfile /var/log/ntp.log >> >> If I run ntpdate from a prompt, I get the following error message: >> >> # ntpdate >> 20 Apr 12:02:08 ntpdate[50109]: no servers can be used, exiting >> >> But if I type: >> >> ntpdate time.nist.gov it will update the time. Is there something >> wrong with my /etc/ntp.conf file? > > I don't believe ntpdate uses ntp.conf. Try ntpd -q > > I don't have 5 running anywhere anymore, but if you read the man pages > for 6.3, it's clear that ntpdate is depreciated and on its way out. > > Or you could just run ntpd as a daemon to maintain your time. Exactly. If you wish to use your /etc/ntp.conf file, add this to /etc/rc.conf: ntpd_enable="YES" and start it with /etc/rc.d/ntpd start check /var/log/messages to see when it kicks in. It normally takes some time before it does the first correction. You will see messages like this: Apr 20 18:41:46 atlantis ntpd[783]: time reset +0.416117 s Apr 20 18:41:46 atlantis ntpd[783]: kernel time sync status change 2001 and then you will know it is working.