Re: [chrony-dev] chronyd and hwclock

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


On Sat, Feb 22, 2020 at 05:15:36PM -0800, Bill Unruh wrote:
> 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)

chronyd keeps the RTC device open for the whole time it is running
when configured with the rtcfile directive. I think the main reason is
that it wouldn't be able to open it later when it no longer has the
root privileges. That it prevents other programs from messing with the
clock is a nice side effect. I think there can be only one application
using the RTC interrupts.

On Sat, Feb 22, 2020 at 08:20:30PM -0800, Bill Unruh wrote:
> 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.

It depends on the /etc/adjtime file (i.e. the UTC/local setting
when hwclock was last called), or the rtconutc setting if /etc/adjtime
doesn't exist.

-- 
Miroslav Lichvar


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