Re: chrony and rtc



In <vzNXh.713$JF6.478@edtnps90>,
Unruh <unruh-spam@xxxxxxxxxxxxxx> wrote:

Tony Houghton <h@xxxxxxxxxxx> writes:

Chrony doesn't seem to be able to interact with the RTC on my system,
beyond tying up /dev/rtc so nothing else can access it. If I stop
chrony, hwclock works OK, but chrony doesn't correct the rtc or write

You do NOT want to use hwclock if you use chrony. That would totally mess
it up.
chrony does not correct the rtc. It measures it and writes the results out
to a file when it is shut down or when you give it the writertc command in
chronyc.

Except it doesn't. I've got:

rtcfile /var/lib/chrony/chrony.rtc

in /etc/chrony.conf but it doesn't create the file. It can write other
files in that directory no problem though.

the rtcfile. It allows the RTC to drift without correcting it, so after
booting up it can take several minutes for it to gradually correct the
system clock.

You need to boot up with the correct flags to chrony
chronyd -r -s

According to the docs that makes it set the system clock from the rtc,
not the other way round. At the moment that's the last thing I want it
to do, seeing as it can neither correct the RTC nor predict how
inaccurate it is, and tries to prevent anything else from correcting it!

The docs say it should support the RTC on 2.6 but you need to set the
HPET_EMULATE_RTC option if your motherboard has an HPET (I don't know
whether mine has, but I've enabled the option). There's nothing in the
logs from chrony about rtc.

/var/log/chrony is where the logs are./etc/chrony.conf must contain
directives like
log measurements sources rtc
for the logs to be written.

I had more in mind syslog where it might have written some error
messages shedding light on why it's not working properly.

There's also been something else wrong with it, because I noticed my
system clock was about a minute out earlier today. I thought it later
gradually corrected itself, but I'm not sure. Since stopping and
starting it a few times I noticed that the clock was over a minute out
again. I've deleted /var/lib/chrony/* and corrected both clocks
manually; it's now a case of wait and see...

My system clock is now the best part of a second behind my
radio-controlled clock. chrony doesn't seem to be making any effort to
correct this, even if I run makestep in chronyc.

--
TH * http://www.realh.co.uk
.



Relevant Pages

  • Re: Setting The System Clock [Linux]
    ... but chrony also corrects for your rtc errors. ... it is on local time, and display that time. ... ] `chronyd' assumes by default that the real time clock keeps ...
    (comp.os.linux.misc)
  • Re: Setting The System Clock [Linux]
    ... but chrony also corrects for your rtc errors. ... >the rtc, subtract 28800 sec, and set your Linux system time to that. ... >it is on local time, and display that time. ...
    (comp.os.linux.misc)
  • Re: chrony and rtc
    ... chrony, hwclock works OK, but chrony doesn't correct the rtc or write ... chrony does not correct the rtc. ... logs from chrony about rtc. ... system clock was about a minute out earlier today. ...
    (uk.comp.os.linux)
  • Re: Chrony on an Isolated Machine
    ... >> enabled it messes with rtc (basically disables it and chrony handles it ... What is HPET? ... However it really is not compatible with rtc. ... Thereafter system time is already correct and you should not ...
    (comp.os.linux.networking)
  • Re: chrony and rtc
    ... chrony, hwclock works OK, but chrony doesn't correct the rtc or write ... You do NOT want to use hwclock if you use chrony. ... chrony does not correct the rtc. ... seems to be setting the system clock from the hw clock, ...
    (uk.comp.os.linux)