Re: [chrony-users] Does Chronyd update the hardware clock? |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-users Archives
]
On Wed, 11 Jun 2014, Joe M wrote:
Hello Bill,
Thanks again your quick and detailed reply.
If you told us what you hope to accomplish, we might be able to give better
advice.
I have a linux computer on a network which loses internet connectivity for
atleast 8 hours every day. The computer is also prone to power loss. I
have the hard discs on raid-1 and also had ntpd running.
I noticed an instance where the start time on the computer was 2
minutes behind the time reported in earlier log entries. I presume
that this does not work well with the raid-1 functionality.
Hence, I want to do something to ensure that the hwclock is synced up
with the system clock once in a while.
I also read that for computers which lose internet connection,
chrony > ntp. Hence, I switched over to chrony.
Now, I am trying to figure out how to sync up the hwclock with the
system clock. I read that the "11-minute mode" (enabled with rtcsync)
is not ideal. "rtcautotrim" is probably what I need.
Does that help? Or, are there any other details that I can provide? I
am on the latest linux stable kernel and the distro is gentoo. The cpu
is AMD on that particular computer.
The loss of connectivity the rtc helps not at all with. It is in general a
worse clock than the system clock. If the system clock has been allowed to
stabilize (ie find its own drift rate ) then it should survive an 8 hour
connectivity loss with only a few microseconds of time drift. (Ie, the clock
gets disciplined to about a few PPM. It actually does better than that on a stable
system, but temperature changes can make a difference).
So, the problem is the power loss. I assume that the power loss is not for
hours. chrony, run with trimming the rtc, finds the offset and rate of the rtc
and if you start up chrony with the -s option, as Lichvar said, it will use
that to improve the extimate of the time. Now that means that you need to
bring up chrony early, since mode distros use hwclock to bring the time from
the rtc to the system early on in the bootup. Now hwclock itself has the
possiblity of also adjusting for the offset and rate of the rtc, but the
machine needs to have been brought down properly-- not crash. Thus there may
be a small window in there where the hwclock uses the rtc before chrony
readjusts the rtc reading. For that the rtcautotrim might help-- I have never
used it. I assume that the autotrim also estimates the rtc rate, and simply
adjusts the rtc offset.
Another option is to attach a gps to the computer, and use that to set the
time.
--
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.