Re: [chrony-dev] can chrony adjust H/W clock too ?q:q

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


On Wed, 21 Apr 2010, Miroslav Lichvar wrote:

On Wed, Apr 21, 2010 at 03:43:24PM +0530, J. Bakshi wrote:
The point was not to use both hwclock AND chrony to condition the RTC
since they are both trying to do the same job independently and will
fight...

This is the very point which I was asking for. If chrony itself
takes care off rtc then there is no need to use hwclock individually
through cron.

Depends on what you mean by take care. If you need RTC synced to
correct time, you will need to periodically run chronyc writertc
command. OTOH, RTC with ntpd is always synced as the adjtimex UNSYNC
flag is unset and kernel writes to RTC system time every 11 minutes.

We can add an option to unset the UNSYNC flag in chrony too (would be
allowed only if rtcfile is disabled).

That would completely destroy chrony's ability to determine the drift of the
rtc clock (or hwclock's ability to determine its drift). The ONLY use of the
rtc is for setting the intial clock. This would make that far worse.


If you only need time compensated for drift when setting system clock
from RTC on start, you can use chronyd -r or hwclock --adjust.

-s


Having rtcfile directive in chrony.conf only enables RTC tracking, it
doesn't write to RTC nor set system clock from RTC on start unless the
-r option is used.

chrony only writes to rtc when you give chronyc the "trimrtc" command. That at least allows chrony to continue tracking the drift rate of the rtc,
something with the "continuous adjustment" process ( whether in the kernel
every 11 min or via his hwclock in cron) totally destroys.

One fix that the rtc stuff does need is a series of averages of the rtc clock
drift rate. That drift rate can vary by 3 or 4 PPM ( eg 1-2 sec per day) and
thus exactly what drift compensation you get depends on exactly when the the
rtc file was last written. Of course because of the very different
temperatures of an on, and off computer, this is probably irrelevant anyway.
Ie, you are lucky if the drift correction is off by only a few PPM.




---
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/