On Sat, 2019-11-23 at 10:09 -0500, Sam Varshavchik wrote:
Tom Horsley writes:
> On Sat, 23 Nov 2019 08:59:02 -0500
> Sam Varshavchik wrote:
>
> > Anyone know where to investigate this further?
>
> The linux app that syncs to the hardware is "hwclock" (which
> has various obscure parameters described in the man page).
>
> You could make a script to sync with hwclock then reboot
> and see if the time is more in sync when it comes back.
> That would verify it isn't being synced (but, unfortunately,
> wouldn't help track down where the hwclock call ought
> to happen).
I would expect that something would already be doing that.
> Or maybe just replace the cmos battery on the motherboard
> and see if it get better :-).
Checking some other boxes I just rebooted, only this one is griping
about
the clock.
All these boxes are up 24/7. The longest they've been without power
is about
a week, when power's been out after a hurricane. Plus an occasional
day of
downtime, every other year or so, when power goes out for other
reasons.
Some of those boxes are just as old as this one. Something has to be
syncing
the system time to the hardware clock on a reboot, otherwise their
clocks
would've drifted just as much. Maybe the other motherboards don't
drain the
battery at all when system power is on, and this one does.
So, hwclock must be getting synced. But I don't see where hwclock
would be
getting called from. grepping /lib/systemd/system finds nothing.
hwclock
itself comes from util-linux, which doesn't install anything there.
Is chrony itself supposed to keep the hw clock synced?
From
https://chrony.tuxfamily.org/manual.html#rtcsync-directive::
4.2.55 rtcsync
The rtcsync directive enables a mode where the system time is
periodically copied to the real time clock (RTC).
On Linux the RTC copy is performed by the kernel every 11 minutes. This
directive cannot be used when the normal RTC tracking is enabled,
i.e. when the rtcfile directive is used.
On Mac OS X, chronyd will perform the RTC copy every 60 minutes when
the
system clock is in a synchronised state.
On other systems this directive does nothing.
/Louis