Re: [chrony-dev] chronyd and hwclock

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


As a supplimentary question, if my systemclock is way off (say 8 hours because
I used to keep my rtc in local mode, but now want it in utc mode, but the
system booted up thinking the local rtc was in utc, so the system clock was
set 8 hours out.) and  I do trimrtc after running chrony for a while, is the rtc
set to the system time ( which is still way off of UTC time) or to the true UTC
time, which chrony knows exactly what that is. I do not care about +-1 second.
I do care about +-8hours.



William G. Unruh __| Canadian Institute for|____ Tel: +1(604)822-3273
Physics&Astronomy _|___ Advanced Research _|____ Fax: +1(604)822-5324
UBC, Vancouver,BC _|_ Program in Cosmology |____ unruh@xxxxxxxxxxxxxx
Canada V6T 1Z1 ____|____ and Gravity ______|_ www.theory.physics.ubc.ca/

On Sat, 22 Feb 2020, Dustin Marquess wrote:

I'm guessing you have the rtcsync option enabled in chrony.conf.  That
probably is what is doing it.

-Dustin

On Sat, Feb 22, 2020 at 7:15 PM Bill Unruh <unruh@xxxxxxxxxxxxxx> wrote:

If I run chronyc, I get the following from hwclock

[root]>hwclock --verbose
hwclock from util-linux 2.33.2
System Time: 1582419894.572200
Trying to open: /dev/rtc0
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.

Does chronyd purposely block access to the hardware clock?

cat /sys/class/rtc/rtc0/time
does give the rtc time as does the date file. So the hardware clock is
running.
Doing an strace on hwclock while chrony is running gives
openat(AT_FDCWD, "/dev/rtc0", O_RDONLY) = -1 EBUSY (Device or resource busy)

so I presume that it is chrony that is blocking rtc0.

Is that on purpose? Or could it be opened when chronyd wants to read or write
the rtc, and closed otherwise. (after all, after the first millisecond, chrony
does not use the hardware clock, except with explicit reads)


William G. Unruh __| Canadian Institute for|____ Tel: +1(604)822-3273
Physics&Astronomy _|___ Advanced Research _|____ Fax: +1(604)822-5324
UBC, Vancouver,BC _|_ Program in Cosmology |____ unruh@xxxxxxxxxxxxxx
Canada V6T 1Z1 ____|____ and Gravity ______|_ www.theory.physics.ubc.ca/

--
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.


--
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.


--
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/