On 2019-11-24 12:22, Sam Varshavchik wrote: > Louis Lagendijk writes: > >> On Sat, 2019-11-23 at 10:09 -0500, Sam Varshavchik wrote: >> >> > So, hwclock must be getting synced. But I don't see where hwclock >> > would be >> > getting called from. grepping /lib/systemd/system finds nothing. >> > hwclock >> > itself comes from util-linux, which doesn't install anything there. >> > >> Is chrony itself supposed to keep the hw clock synced? >> From https://chrony.tuxfamily.org/manual.html#rtcsync-directive:: >> >> 4.2.55 rtcsync >> >> >> The rtcsync directive enables a mode where the system time is >> periodically copied to the real time clock (RTC). > > That looks like it. The rtcsync directive exist in my chrony.conf. I didn't > put there, so it must be in the default chrony.conf > > So, the hardware clock seems to be getting synced, but it loses some seconds > during a reboot. >
FWIW, this appears to be not working as expected on my system. The chrony.conf man page states: On Linux, the RTC copy is performed by the kernel every 11 minutes. This would indicate to me that within 11 minutes the clocks should be "sync'd" and be close. I ran as script which collects the system time and the hwclock time. Just doing date +%Y-%m-%d\ %H:%M:%S.%N%:z > tdiffs ; hwclock -r >> tdiffs I then called it with 12 minute sleeps in the following manner tdiff ; cat tdiffs ; sleep 720 ; tdiff ; cat tdiffs ; sleep 720 ;tdiff ; cat tdiffs The results being 2019-11-24 13:15:34.760898924+08:00 2019-11-24 13:15:34.702288+08:00 2019-11-24 13:27:35.070572131+08:00 2019-11-24 13:27:34.999148+08:00 2019-11-24 13:39:36.083624152+08:00 2019-11-24 13:39:35.967988+08:00 As one can see, the difference continues to increase. If rtcsync were working I would expect the difference would remain fairly stable. That it isn't working would seem to bare out the records of boots from earlier this year. When the system was up 24/7 from 4/14 to 4/22. And when the system was rebooted on 4/22 I see Apr 22 18:25:21 meimei.greshko.com chronyd[850]: System clock wrong by 35.483104 seconds Additionally, the difference between the 2nd and 3rd readings would suggest a an increase of .04421 seconds in a 12 minuted period or about 5 seconds/day. And that tracks with the 7 day period between boots. -- The key to getting good answers is to ask good questions. _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org