Re: [chrony-dev] chronyd and hwclock |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: [chrony-dev] chronyd and hwclock
- From: Miroslav Lichvar <mlichvar@xxxxxxxxxx>
- Date: Mon, 24 Feb 2020 09:00:28 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582531235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to; bh=RtIus+VAD7vCiWnV6l0TMCriHqHh8GKJt0OMPQurIuY=; b=KoB/so6x13bkKL7tREbeBZAnEj7EjBf+gECKiMVSMzHmJpLHMh8KbJOhR2sDZMKT2hpOqa sUvgqb/WuLc4sBGfqc44/ClcQjaMdfRe0u8Cq4o20kqyWswAkfiHFV28ZMrmd5OX4KhXAP 9z4ENhlsMS5bCBRBx6ySQLqRQ8edQoo=
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.