Re: [chrony-users] Chrony behaviour on local reference mode

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


What are you trying to do? local mode essentially does nothing. It certainly
does not discipline the clock. All it does is to tell the world "I have no
idea what the time is, but to keep you happy I will pretend I do". Local mode
does not discipline the server clock. It just tells the world that it is
synchronized to something, so believe its time. chrony tries hard to be truthful, and having been synchronized to a reasonable
source in the past, it keeps using that until it is clear to chrony that it
can no longer honestly believe the time from that remote source in the past
(the frequency synchronization has exceeded the uncertainly of the frequency
offset calibration and the time has thus exceeded some threshold. ) The way to
protect against loss of external clocks is to have more external references,
so if one stops then there are others to rely on. The local directive is if it
is more crucial that a bunch of clocks all show the same time that it is that those
times have anything to do with the real time, and if the server's freerunning
clocks are more accurate than the clocks of the other computers it is server
for.

Note that, while you may know that you have disconnected the external source,
chrony has no idea what has happened. It expects that there was a temporary
glitch which will resolve itself. If the remote server was much more accurate
than the local clock, then its time will be trusted (even if it occured in the
past) for a long time before chrony gives up on it.



Dear all,

I have set up a chrony server with a local reference as the sole available source.
The server is correctly synchronized with the local clock:

Reference ID    : 7F7F0101 ()
Stratum         : 12
Ref time (UTC)  : Mon Oct 12 16:06:27 2020
System time     : 0.000000009 seconds slow of NTP time
Last offset     : -0.000005781 seconds
RMS offset      : 0.008687890 seconds
Frequency       : 63.148 ppm fast
Residual freq   : +0.000 ppm
Skew            : 0.000 ppm
Root delay      : 0.000000000 seconds
Root dispersion : 0.000000000 seconds
Update interval : 64.0 seconds
Leap status     : Normal

In particular the reference ID 7F7F0101 tells me that the local mode is operating (enabled with chronyc local stratum 12 orphan) and

^? 127.127.1.0                  12  10   377   825    -11us[  -11us] +/-   17us

Then I add a server (chronyc add server 10.61.255.254 iburst maxpoll 6 port 123 prefer)
and I see chrony switching to this server. I now have:

Reference ID    : 0A3DFFFE (10.61.255.254)
Stratum         : 5
Ref time (UTC)  : Mon Oct 12 16:29:08 2020
System time     : 0.151633009 seconds fast of NTP time
Last offset     : +0.000192363 seconds
RMS offset      : 0.070889302 seconds
Frequency       : 63.148 ppm fast
Residual freq   : +184.986 ppm
Skew            : 0.132 ppm
Root delay      : 0.118800372 seconds
Root dispersion : 0.033694923 seconds
Update interval : 2.1 seconds
Leap status     : Normal

with the local clock still available:

^? 127.127.1.0                  12  10   377   180   -246ms[  -12us] +/- 2036us
^* 10.61.255.254                 4   6    37     7   -147us[  +11ms] +/-  103ms

So far it behave as I expected. But now if I remove the server I added (chronyc delete 10.61.255.254)
I would expect to return the the first situation. Instead after some time I end-up with this:

Reference ID    : 7F7F0100 (127.127.1.0)
Stratum         : 12
Ref time (UTC)  : Mon Oct 12 16:50:56 2020
System time     : 0.000032901 seconds fast of NTP time
Last offset     : +0.000018242 seconds
RMS offset      : 0.044247311 seconds
Frequency       : 72.399 ppm fast
Residual freq   : +0.025 ppm
Skew            : 9.118 ppm
Root delay      : 0.000058132 seconds
Root dispersion : 0.027406862 seconds
Update interval : 64.6 seconds
Leap status     : Normal

which is not exactly local mode (reference id is not 7F7F0101). Is this behavior correct? Local clock seems to be used:

^? 127.127.1.0                  12   6   377    20    -11us[  -11us] +/-   31ms


I also have an other question: from my experiments I noted that chrony "takes time" to switch the source used for synchronization to an other one when it becomes unreachable. The time I saw is greater than half an hour. Is there some configuration options that may be used to adjust this delay?

Kind regards,
Antoine.​N?????r??y隊W!????????????r???n????\??"?????r??z)???.n7??Z+???zf?????|????????????'???}???*+?????)???.n7??:蹹^f??X??f??????'???}???*+


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