Re: [chrony-users] Chrony on Asus router - no reduction of offset |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-users Archives
]
- To: chrony-users@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: [chrony-users] Chrony on Asus router - no reduction of offset
- From: Torsten Wolf <torsten.wolf@xxxxxxx>
- Date: Wed, 14 Jun 2023 18:24:36 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.com; s=s31663417; t=1686759878; x=1687364678; i=torsten.wolf@xxxxxxx; bh=dOlbzTE14znF09baF7D+opeHyAujBM6v8xzz+5E7GuM=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=s6YAlF1q1yNPIX44bKPmHzOyjGsQAJ3xZB9ObcJLQfdxDaOaDlLSqWoWYOZWWEvjYjI2vbE 2qvqlogBarLWgSw0XA6RNV6g5XMaIYIR7WYLwbp/IvJHvUm7dVH2NdLOcxpGve2bhUhWFPN41 oZHnxVHICnRnZFv5l+PUyx50PGW2CtKxkMYsVncluMEV2qfNebbMDmx7qun7etj2i3I0cDcR5 v10hZPjm1s1ALHUPYP7Q8GAy5RZx8qOegr4GyjNN5z/BfGvk62MTfYqaG609CGbU1bJywBydd AvpB6TtEhzinH9z0SVEngNOVQ3jVM1vnmAMZvHpKNQkKa9op6O1Q==
- Ui-outboundreport: notjunk:1;M01:P0:SRQC6lEztIk=;3f08oWsAo8Iy5FUH71lFdUt1GRD /rwJBF1AXmfaQKrvoVcJluAu/iUMTPN/Rfy7+NQo8KBrC14/uIU5nb1pB/SIwCD1+D0uBxgxj h1LrB4DQRsQhxM0zCFqe56Wq/lgjU2fk7cX61U4FwawNZwut3QoaVjDENkEq7OW547mlNLYQo 4Dh3f/UbShU/975Is87V9kobNwP5Ca101lV3N2p6zLjCwMyTOkXJNGIsbUvmq8fs4rDZc1Cul l+jG0WybZztDHvmvaNe+sOIKNfh50o7rYPRCIzxq3Po0lzdGxkS9OUTgGQBOxsIAt4h752Sip iX610wPSWVG6nrxqdRTFuxaCSCnHE4ibbpI1vjjW36ln7pf7bzn1rDPAcHZGijYkJagcxDafQ tnfYipf97yiyNx8um6jjNCNXqZLH5Rie8dyaOSCBBnC2AEDjeEgWiFtP8cd+GztjqzemzzaiK bhVG1ZvSDM59xK0hicZ7GRv8rRMSoGayqEVcs+4ylKcOY8XVgkTxce0PuzoRKq6aleBBXDxRM GqcOEmLLKDJxcZWh3LY1UjucunB3Af7e2vh91sukAmKbkcL/ohTxNmHw1O5ZM4VYO7r0MJFmE la7BsxcspXVmPa70iFjglTnYEkUiAAwd+aTSctFr6ZQGHZL4gHDkGWI9Duk745eMbZfCC5l7E fZ+JYjIFH0xvOvqLiWnHmFaVfJtgirocgkS95+Jf7j6rsluYLx13tEi64v0gisM5xkAaKERoX T+d1uMjGFE8vU1UjPdAZ4yPd5yyRazRy6XuzVtZ7KivdhVajr6B/t1tnPqz8ojpyA6rYZCoMe aORK7DmY77wNzUrZpn1VgfRWavI5C+qBmn0KFjRaLFjJR8eTJSTe8IQSq426aCPMsseD38TEo Z51E/8ITrQePveqQn5nfO2g5tezuqENdyZ1yEGqWCONd0lvNR/Aaw8faDEIjboyISBJFbpgQF 34+iSFaf6tJp0Yag2A8SqzzDUJ0=
I didn't want to respond too quickly and observe the situation...
The current setup uses the local raspberry (with attached GPS receiver)
as single source. This is the output from the server (public servers
just shown for comparison)
chronyc -m sources sourcestats tracking
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
#? GPS 0 4 377 14 +12ms[ +12ms] +/-
100ms
#* PPS 0 4 377 14 +723ns[ +809ns] +/-
526ns
^? zeit.fu-berlin.de 1 10 377 841 -3489us[-3489us] +/-
57ms
^? ptbtime1.ptb.de 1 10 377 28m -3797us[-3794us] +/-
9661us
^? ptbtime2.ptb.de 1 10 377 746 -5759us[-5759us] +/-
12ms
^? ptbtime3.ptb.de 1 10 377 599 -2460us[-2461us] +/-
9170us
^? ns.tu-berlin.de 2 10 377 125 -3807us[-3808us] +/-
14ms
Name/IP Address NP NR Span Frequency Freq Skew Offset Std Dev
==============================================================================
GPS 6 4 82 -276.813 1024.470 +1861us 8124us
PPS 44 26 688 +0.000 0.002 +0ns 802ns
zeit.fu-berlin.de 31 18 516m +0.034 0.030 -1611us 404us
ptbtime1.ptb.de 25 17 414m +0.022 0.037 -2073us 368us
ptbtime2.ptb.de 19 10 310m -0.014 0.082 -2628us 510us
ptbtime3.ptb.de 19 7 309m +0.032 0.062 -2319us 334us
ns.tu-berlin.de 23 12 396m +0.019 0.046 -2058us 417us
Reference ID : 50505300 (PPS)
Stratum : 1
Ref time (UTC) : Wed Jun 14 15:54:52 2023
System time : 0.000000008 seconds fast of NTP time
Last offset : +0.000000087 seconds
RMS offset : 0.000000120 seconds
Frequency : 0.804 ppm fast
Residual freq : +0.000 ppm
Skew : 0.002 ppm
Root delay : 0.000000001 seconds
Root dispersion : 0.000015001 seconds
Update interval : 16.0 seconds
Leap status : Normal
Now to the Asus router (polling just the raspi and acting as server in
the local network). After the responses I got here I changed the config.
The following reflects the current setup.
server 192.168.1.105 minpoll -1 maxpoll 2 filter 15
server zeit.fu-berlin.de iburst noselect
server ptbtime1.ptb.de iburst noselect
server ptbtime2.ptb.de iburst noselect
server ptbtime3.ptb.de iburst noselect
server times.tubit.tu-berlin.de iburst noselect
driftfile /opt/var/lib/chrony/drift
dumponexit
dumpdir /opt/var/lib/chrony
pidfile /opt/var/run/chrony/chronyd.pid
ntsdumpdir /opt/var/lib/chrony
makestep 1.0 3
allow 192.168.0.0/16
deny 192.168.1.104
deny 192.168.1.105
broadcast 60 192.168.1.255
logchange 0.5
lock_all
chronyc -m sources sourcestats tracking
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* 192.168.1.105 1 -1 377 2 +36us[ +41us] +/-
350us
^? zeit.fu-berlin.de 1 6 377 27 -3778us[-3809us] +/-
57ms
^? ptbtime1.ptb.de 1 6 377 32 -2285us[-2304us] +/-
8006us
^? ptbtime2.ptb.de 1 6 377 21 -2048us[-2044us] +/-
8463us
^? ptbtime3.ptb.de 1 6 377 24 -2564us[-2596us] +/-
7919us
^? ns.tu-berlin.de 2 6 377 14 -3809us[-3798us] +/-
15ms
Name/IP Address NP NR Span Frequency Freq Skew Offset Std Dev
==============================================================================
192.168.1.105 16 8 115 +0.013 0.814 +9ns 28us
zeit.fu-berlin.de 42 17 44m -2675.180 171.496 -23ms 237ms
ptbtime1.ptb.de 24 12 24m -2772.983 394.076 -146ms 229ms
ptbtime2.ptb.de 28 12 29m -2740.241 334.810 -74ms 236ms
ptbtime3.ptb.de 42 17 44m -2665.681 143.979 +7634us 227ms
ns.tu-berlin.de 33 16 34m -2759.361 216.632 -191ms 204ms
Reference ID : C0A80169 (192.168.1.105)
Stratum : 2
Ref time (UTC) : Wed Jun 14 15:58:57 2023
System time : 0.000006924 seconds fast of NTP time
Last offset : +0.000005338 seconds
RMS offset : 0.070425719 seconds
Frequency : 11.810 ppm slow
Residual freq : +0.013 ppm
Skew : 0.865 ppm
Root delay : 0.000361663 seconds
Root dispersion : 0.000058637 seconds
Update interval : 7.6 seconds
Leap status : Normal
The router runs a script which logs the offset (ms) and drift (ppm)
every 10 minutes. For almost half a day the offset is fluctuating
between +/- 0.05ms. This is much better than what I observed prior to my
initial posting. I guess I would be happy but then there are one or two
occations per day where the offset suddenly exceeds the logchange limit,
e.g., to something like -0.7s which chrony then gradually corrects.
Here is an example from today with offset and drift:
09:30:00 -0.027553 9.819
09:40:00 -0.004318 10.866
09:50:00 -0.005717 11.193
10:00:00 150.749 12.41
10:10:01 -50.4177 12.298
10:20:00 -43.7645 12.356
10:30:01 -17.488 12.256
10:40:00 -54.5296 12.498
10:50:00 -106.559 12.223
11:00:00 -80.029 12.407
11:10:00 -0.05282 12.508
11:20:01 -691.29 12.335
11:30:00 0.018295 12.594
11:40:01 -0.068731 12.71
11:50:00 0.007319 12.483
12:00:00 -0.087129 12.335
12:10:01 0.013139 12.451
12:20:00 -0.057343 12.031
12:30:00 -0.006875 12.203
I have no explanation how this is possible. I don't see anything
suspicious in the raspi chrony offset data which I monitor via grafana.
Could it be a hardware issue? Voltage fluctuations? I have no clue. How
can I debug this?
Miroslav Lichvar schrieb am 12.06.23 um 09:21:
On Sat, Jun 10, 2023 at 08:09:04PM +0200, Torsten Wolf wrote:
Name/IP Address NP NR Span Frequency Freq Skew Offset Std
Dev
==============================================================================
192.168.1.105 44 19 46m -2691.479 161.086 -91ms 242ms
zeit.fu-berlin.de 48 21 50m -2636.146 123.263 +17ms 218ms
ptbtime1.ptb.de 57 25 60m -2632.208 101.466 +45ms 232ms
ptbtime2.ptb.de 54 23 57m -2651.780 111.097 -18ms 234ms
ptbtime3.ptb.de 55 24 58m -2601.458 110.065 +114ms 233ms
ns.tu-berlin.de 49 21 51m -2600.763 126.308 +79ms 245ms
The skew is too large for the frequency to be accepted with that
maxupdateskew you have configured. This causes the clock to drift away
between updates (sawtooth wave).
There is something wrong with the system or hardware. Stddev of 240ms
to a local server is too high. Is ping to the server better?