Re: Sync system time with RTC



On Tuesday, in article <7NJMf.118$JZ1.9328@xxxxxxxxxxxxxxx>
tog@xxxxxxxxx "The Other Guy" wrote:

Michael Sierchio wrote:
The Other Guy wrote:
Hi,

Is there any way to instruct FreeBSD to use the RTC instead of
maintaining an internal time reference?

I'm running FreeBSD in QEMU and the clock is falling behind by hours
each day.

man ntpd. man ntpdate.

I am actually using ntpd on the network, including on virtual systems
running under Qemu. This doesn't make any difference, I suspect due to
the rate the clocks vary. By the time ntpd does the initial check, the
clock is already out by more than the maximum amount ntpd will adjust for.

I was hoping there was a simple sysctl setting or another option to use
the RTC instead as this seems to be more reliable.

Not that I can see. It's possible to set a different tickrate in
kernel config but that might still be erratic when running qemu
and clock would then normally be a lot too fast which is probably
a worse situation.

Have you tried just repeatedly calling 'ntpd -q -g' to poll and exit
or 'ntpdate -b -t timeout server' ?

David

--
The Reply-To: is valid for at least 30 days after posting date
David Lord - david@xxxxxxxxxxxxxxxxxxxx
.



Relevant Pages

  • Re: Something Wicked (with my hdwr clock) This Way Comes
    ... delivered by the RTC to the OS? ... I ruled out the possibility of the CMOS clock ... `ntpd', hand set my system clock to freerun using ...
    (Fedora)
  • Re: Severe time drift for Undisciplined Local Clock
    ... clock (computer motherboard hardware clock, ... There is no driver for the RTC in the standard distribution of ntpd, ... What is called this in ntpd is the software maintained clock. ...
    (comp.protocols.time.ntp)
  • Re: iburst
    ... Just a normal user trying to keep a somewhat accurate clock. ... When I finally got that worked out, my boot time went from about 1 minute to many minutes. ... I discovered that ntpd was the culprit. ... It takes ntpd several minutes to synch during boot. ...
    (comp.protocols.time.ntp)
  • Re: Clock drift problems
    ... the real-time clock has gotten 7 hours slow. ... I can understand that, but things like NTP ... Maximum drift rate for ntpd is 500ppm or something tiny like that. ... on x86 ATX motherboard linux boxes that are doing heavy I/O ...
    (comp.os.linux.misc)
  • Re: Set your system clock
    ... I don't see any reason not to just turn off ntpd and let ... >> cron run ntpdate every hour or so. ... >> clock accurate with less net bandwidth and resource usage. ... versions of ntpd do in fact call ntpdate to do that one time crash ...
    (Debian-User)