Re: [chrony-dev] Question / Feature suggestion - trimrtc on start? |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
On 20/07/2011 18:23, Miroslav Lichvar wrote:
> On Wed, Jul 20, 2011 at 05:24:35AM -0700, Bill Unruh wrote:
>> trimrtc is supposed to occur such that the algorithm to determine the rtc
>> drift rate compensates for the change in rtc caused by the trinrtc (all
>> entries in the prior rtc measurement table are shifted by the same amt that
>> the rtc is).
>
> When the RTC is trimmed, the old samples are dropped and the
> measurement starts from scratch. The reason behind this seems to be
> that RTC can't be set very precisely (only to half a second?).
>
> I think the proposed option could behave similarly to running hwclock
> --adjust on boot.
That would be perfect. I anticipate that my device might only be turned
on for a few hours at a time and sometimes connect to dialup where we
can check other ntp servers. The goal isn't perfection, only doing the
best we can
It would be desirable to simply step the RTC "closer" to our estimate of
realtime on an "infrequent" basis, eg boot and every few hours
thereafter. Ideally stepping the RTC would simply update it by an offset
and not throw away the current drift estimates (this seems safe at boot
since we wouldn't have done anything yet).
So yes, exactly like hwclock --adjust... (I have removed all calls to
hwclock from my device - and it's installed, but I don't think hwclock
is even called on a default build of gentoo?). I guess the correction
could be done externally by reading the rtcfile results, calling
hwclock, then figuring out the new offset and writing that back to
rtcfile before finally starting chrony... This feels awkward and slow
for a boot script though...
Other suggestions gratefully appreciated. I have sketched out the
requirements in my other email. Although on the surface they seem niche,
I don't think it's entirely unreasonable that internet connected phones,
tvs (and fridges) might want to use chrony in their firmware. Phones are
probably a good example of a modern device which is still "dialup" and
only intermittently connected and often not cleanly rebooted (and mass
market and earning money...)
Thanks for any thoughts
Ed W
---
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.