From owner-freebsd-questions@FreeBSD.ORG Fri Nov 9 02:44:14 2007 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 7103116A469 for ; Fri, 9 Nov 2007 02:44:14 +0000 (UTC) (envelope-from philip@ridecharge.com) Received: from EXHUB015-4.exch015.msoutlookonline.net (exhub015-4.exch015.msoutlookonline.net [207.5.72.96]) by mx1.freebsd.org (Postfix) with ESMTP id 60D9F13C4A6 for ; Fri, 9 Nov 2007 02:44:13 +0000 (UTC) (envelope-from philip@ridecharge.com) Received: from philip.hq.rws (74.93.213.161) by smtpx15.msoutlookonline.net (207.5.72.103) with Microsoft SMTP Server (TLS) id 8.0.744.0; Thu, 8 Nov 2007 18:44:06 -0800 Message-ID: <4733C975.3030300@riderway.com> Date: Thu, 8 Nov 2007 21:44:05 -0500 From: "Philip M. Gollucci" Organization: Riderway Inc. User-Agent: Thunderbird 2.0.0.6 (X11/20070919) MIME-Version: 1.0 To: jekillen References: In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Cc: User Questions Subject: Re: cmos clock to utc time code? 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, 09 Nov 2007 02:44:14 -0000 jekillen wrote: > Hello again; > Here I am with another awkward question: > I have set up ntp and it is complaining that > the time difference is too great; 3606 or so > seconds, and wants the system clock set to > utc. I rebooted and entered bios set up > but I did not see any explicit clues on how > to set this clock to utc. (0r even if it is possible). > The motherboard is ECS w/AMD64. I did > not catch the bios vendor or version. If I have > to I will reboot again to look at it or dig up the > manual for the motherboard. > I tried sysinstall but it just asks if the system > clock is set to utc. (thus the question here) > Any advice, suggestions, info appreciated; > Thanks in advance > Jeff K This doesn't really have anything to do with your CMOS clock. sysctl kern.securelevel at > 1, you can't change the clock by more than 1 second. man 7 securelevel Look for phrase - 'The security levels are:' You can't lower it without rebooting. You can change it in /etc/rc.conf(5). $ grep secure /etc/rc.conf kern_securelevel="-1" kern_securelevel_enable="YES" Or your could boot single user mode and run ntpdate once yourself since the securelevel (securit level) isn't set until you go multi-user mode. $ ntpdate server.com HOWEVER, I recommend the new fangled way you are supposed to do this: 1) Enable it in /etc/rc.conf(5) echo 'ntpd_enable="YES"' >> /etc/rc.conf echo 'ntpd_sync_on_start="YES"' >> /etc/rc.conf 2) Create /etc/ntp.conf(5) echo "server ntp-1.vt.edu" > /etc/rc.conf echo "driftfile /var/db/ntp.drift" >> /etc/rc.conf Use time servers close to you though and more than 1. 3) Reboot Finally, about the timezone By default sysinstall(8) copies a file from /usr/share/zoneinfo to /etc as file localtime based on your choices during the install. You can even run sysinstall again to update it post install. ls -l /etc/localtime -r--r--r-- 1 root wheel - 1.2K Jul 25 14:58:48 2007 /etc/localtime HOWEVER, its easier to just create a symlink to the one you want. If you want your system to run in utc time do this: cd /etc sudo rm -rf /etc/localtime sudo ln -s /usr/share/zoneinfo/etc/UTC localtime Test it: $ date (bash syntax) $ TZ=America/New_York date ..... Check your ntpd(8) communications with time servers: $ ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== *ntp-1.cns.vt.ed 198.82.247.40 2 u 97 1024 377 15.690 37.394 23.382 -- ------------------------------------------------------------------------ Philip M. Gollucci (philip@ridecharge.com) o:703.549.2050x206 Senior System Admin - Riderway, Inc. http://riderway.com / http://ridecharge.com 1024D/EC88A0BF 0DE5 C55C 6BF3 B235 2DAB B89E 1324 9B4F EC88 A0BF Work like you don't need the money, love like you'll never get hurt, and dance like nobody's watching.