[chrony-users] chronyc: Update by "trimrtc" not refelected in rtcfile ?

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

Hi all,
I tried to replace the "hwclock" command by the "chronyc -m password <pw> trimrtc" command
sequence. But I found that when the RTC is successfully trimmed (which requires a 5s wait before
killing chronyd using SIGTERM), at the next restart (chronyd -s, without initstepslew) the system
time is now *mis*-corrected by the previous offset of the RTC:
Sep 14 10:11:27 Com-PC chronyd[8047]: Selected source <LAN-IP3>
Sep 14 11:32:44 Com-PC chronyd[8047]: Trimming RTC, error = -3608.905 seconds            ; trimrtc command issued by shutdown script
Sep 14 11:32:49 Com-PC chronyd[8047]: chronyd exiting                                                               ; chronyd killed by SIGTERM
Sep 14 11:33:07 Com-PC chronyd[8251]: chronyd version DEVELOPMENT starting             ; chrony manually started without initstepslew
Sep 14 11:33:07 Com-PC chronyd[8251]: Set system time, error in RTC = -3608.919873    ; WHY is the error still 3608s ?
Sep 14 12:33:14 Com-PC chronyd[8251]: Linux kernel major=2 minor=6 patch=27
Sep 14 12:33:14 Com-PC chronyd[8251]: hz=100 shift_hz=7 freq_scale=1.00000000 nominal_tick=10000 slew_delta_tick=833 max_tick_bias=1000
Sep 14 12:33:14 Com-PC chronyd[8251]: Frequency -1.226 +- 0.315 ppm read from /etc/chrony.drift
Sep 14 12:33:19 Com-PC chronyd[8251]: NTP packet received from unauthorised host xxx.yyy.xxx.yyy port 123
Sep 14 12:33:22 Com-PC chronyd[8251]: System trim from RTC = -1.681458
Sep 14 12:33:26 Com-PC chronyd[8251]: Selected source <LAN-IP3>
Sep 14 12:33:26 Com-PC chronyd[8251]: System clock wrong by -3608.429025 seconds, adjustment started
The result was that the system time was abruptly corrected by 3608s into the future,
which of crashed my special application.
Don't I use trimrtc correctly ? Did I miss something ?
It seems that I have to wait after issuing the "trimrtc" command and terminating chrony:
Is this correct ? I found 5s to be sufficient, but is there an official wait time ?
Thomas Schmid

Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/