From owner-freebsd-questions@FreeBSD.ORG Mon Jul 7 03:43:04 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A86A8BE0 for ; Mon, 7 Jul 2014 03:43:04 +0000 (UTC) Received: from relay2.tomsk.ru (mail.sibptus.tomsk.ru [212.73.124.5]) by mx1.freebsd.org (Postfix) with ESMTP id 13727238C for ; Mon, 7 Jul 2014 03:43:03 +0000 (UTC) X-Virus-Scanned: by clamd daemon 0.98.1 for FreeBSD at relay2.tomsk.ru Received: from admin.sibptus.tomsk.ru (account sudakov@sibptus.tomsk.ru [212.73.125.240] verified) by relay2.tomsk.ru (CommuniGate Pro SMTP 5.1.16) with ESMTPSA id 35935934 for freebsd-questions@freebsd.org; Mon, 07 Jul 2014 10:43:01 +0700 Received: from admin.sibptus.tomsk.ru (sudakov@localhost [127.0.0.1]) by admin.sibptus.tomsk.ru (8.14.7/8.14.7) with ESMTP id s673h05H061603 for ; Mon, 7 Jul 2014 10:43:01 +0700 (NOVT) (envelope-from vas@mpeks.tomsk.su) Received: (from sudakov@localhost) by admin.sibptus.tomsk.ru (8.14.7/8.14.7/Submit) id s673h0KX061601 for freebsd-questions@freebsd.org; Mon, 7 Jul 2014 10:43:00 +0700 (NOVT) (envelope-from vas@mpeks.tomsk.su) X-Authentication-Warning: admin.sibptus.tomsk.ru: sudakov set sender to vas@mpeks.tomsk.su using -f Date: Mon, 7 Jul 2014 10:43:00 +0700 From: Victor Sudakov To: freebsd-questions@freebsd.org Subject: Re: Updating and displaying CMOS clock Message-ID: <20140707034300.GA60208@admin.sibptus.tomsk.ru> References: <20140706153206.GA46262@admin.sibptus.tomsk.ru> <53B9BC4B.4030609@gooch.io> <20140707021022.GB58025@admin.sibptus.tomsk.ru> <53BA0493.1030205@gooch.io> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53BA0493.1030205@gooch.io> Organization: AO "Svyaztransneft", SibPTUS X-PGP-Key: http://www.dreamwidth.org/pubkey?user=victor_sudakov X-PGP-Fingerprint: 10E3 1171 1273 E007 C2E9 3532 0DA4 F259 9B5E C634 User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2014 03:43:04 -0000 Jesse Gooch wrote: > >>> > >>> What's the command to update the CMOS clock to the time of the kernel > >>> clock? > > > > [dd] > > > >>> > >> > >> To get around this I've started using ntpdate on boot. You can put the > >> following in your /etc/rc.conf: > >> > >> ntpdate_enable="YES" > > > > ntpd_sync_on_start="YES" does the same, but it is not an answer to the > > question, it is a workaround. > > > > Sure, it's a workaround. Why is it so important to set the CMOS clock if > you can just query the current time from a more accurate source on boot? Because there are many scenarios where 1) the network is not yet available on boot (at least at the moment when /etc/rc.d/ntpdate is called); 2) the box has dual boot (e.g. FreeBSD/Windows/DOS whatever) and it would be nice to have an accurate time in the CMOS clock for the alternate OS; 3) ... (others can add their own reasons). > The drift on clocks integrated into computers these days is pretty > terrible AFAIK, which is why NTP is so widespread. If the hardware clock is updated maybe daily, I don't expect any significant drift. -- Victor Sudakov, VAS4-RIPE, VAS47-RIPN sip:sudakov@sibptus.tomsk.ru