Updating and displaying CMOS clock

Victor Sudakov vas at mpeks.tomsk.su
Mon Jul 7 03:43:04 UTC 2014


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 at sibptus.tomsk.ru


More information about the freebsd-questions mailing list