[ntp:questions] long time to report sync per leap indicator, when initial system time is set far into the future
Stephan E.
public-se at innominate.com
Tue Dec 12 16:31:09 UTC 2017
On 12/12/2017 10:39 AM, Mike Cook wrote:
>
> I am pretty sure that this is expected behavior and a configuration error.
>
> I have tried and failed to reproduce this in either 4.2.8p10 or 4.2.8p9 UNLESS there are NOT ENOUGH sufficiently stable servers available at start up.
>
> That is to say, that if their reach values does not tend to 377.
>
> for example if I have only 2 servers configured and only one is stable such as here:
>
> Tue Dec 12 08:19:11 UTC 2017
> remote refid st t when poll reach delay offset jitter
> ==============================================================================
> time-c-g.nist.g .NIST. 1 u 5 16 275 95.193 -398059 0.047
> india.colorado. .NIST. 1 u 14 16 377 130.526 -398062 0.050
>
> The leap indicator will remain 11, i.e. unsynchronized
>
> Tue Dec 12 08:19:03 UTC 2017
> processor="armv7l", system="Linux/3.8.13-bone47", leap=11, stratum=16,
> Tue Dec 12 08:19:08 UTC 2017
> processor="armv7l", system="Linux/3.8.13-bone47", leap=11, stratum=16,
> Tue Dec 12 08:19:13 UTC 2017
> processor="armv7l", system="Linux/3.8.13-bone47", leap=11, stratum=16,
> Tue Dec 12 08:19:18 UTC 2017
>
> So you should make sure that you select servers that have good connectivity ( closer is better ) and use a minimum of 5.
>
> So to debug this, change your date , restart ntpd with just -g and then monitor the server status. If the servers are showing poor connectivity, change/add .
>
> Hope this helps
I've added more servers and it does not change the outcome.
To test, from an initially synced time, I
* shut down ntpd
* change the system time by delta
* start ntpd with -g
* record the time it takes until ntpd will reply with LI==0 to requests from clients.
* repeat with a larger delta.
This works well for deltas into the past, but for deltas into the future I get
delta of 15 s took 374 s to sync
delta of 60 s took 380 s to sync
delta of 240 s took 363 s to sync
delta of 960 s took 1285 s to sync
delta of 3840 s took 4843 s to sync
delta of 15360 s took 15569 s to sync
During that waiting period, I get a status of e.g.
# ./ntpq -c peers
remote refid st t when poll reach delay offset jitter
==============================================================================
ptbtime1.ptb.de .STEP. 16 u - 64 0 0.000 0.000 0.000
ptbtime2.ptb.de .STEP. 16 u 20 64 0 0.000 0.000 0.000
ptbtime3.ptb.de .STEP. 16 u 25 64 0 0.000 0.000 0.000
ntp2.m-online.n .STEP. 16 u 770 64 0 0.000 0.000 0.000
1c.ncomputers.o .STEP. 16 u 385 64 0 0.000 0.000 0.000
ntp1.wtnet.de .STEP. 16 u 850 64 0 0.000 0.000 0.000
backup.heikoric .STEP. 16 u 1864 64 0 0.000 0.000 0.000
# ./ntpq -c rl
associd=0 status=c018 leap_alarm, sync_unspec, 1 event, no_sys_peer,
version="ntpd 4.2.8p10 at 1.3728-o Tue Dec 12 11:03:31 UTC 2017 (1)",
processor="ppc", system="Linux/3.10.104", leap=11,
stratum=16, precision=-18, rootdelay=0.000, rootdisp=1.620, refid=STEP,
reftime=00000000.00000000 Thu, Feb 7 2036 6:28:16.000,
clock=ddda50cf.3c52fb54 Tue, Dec 12 2017 12:57:51.235, peer=0, tc=6,
mintc=3, offset=0.000000, frequency=0.000, sys_jitter=0.003815,
clk_jitter=0.004, clk_wander=0.000
(servers #4 ff. are assigned from pool.ntp.org)
But, even then, from "eyeballing" the system clock it appears correct within at least 1 s, and if I now stop and restart ntpd, I almost immediately get
# ./ntpq -c peers
remote refid st t when poll reach delay offset jitter
==============================================================================
ptbtime1.ptb.de .INIT. 16 u - 64 0 0.000 0.000 0.000
+ptbtime2.ptb.de .PTB. 1 u 1 64 1 57.113 -1.902 2.851
*ptbtime3.ptb.de .PTB. 1 u 2 64 1 57.678 -1.829 7.572
+ntp2.m-online.n 212.18.1.106 2 u 3 64 1 60.288 1.178 4.073
+1c.ncomputers.o 222.217.153.8 2 u 1 64 1 73.751 -0.535 4.885
+ntp1.wtnet.de 10.129.40.211 2 u 1 64 1 57.811 1.985 3.249
+backup.heikoric 124.216.164.14 2 u 3 64 1 61.142 -0.668 5.216
# ./ntpq -c rl
associd=0 status=0614 leap_none, sync_ntp, 1 event, freq_mode,
version="ntpd 4.2.8p10 at 1.3728-o Tue Dec 12 11:03:31 UTC 2017 (1)",
processor="ppc", system="Linux/3.10.104", leap=00,
stratum=2, precision=-18, rootdelay=57.678, rootdisp=192.086,
refid=192.53.103.103,
reftime=ddda5126.d1f40191 Tue, Dec 12 2017 12:59:18.820,
clock=ddda512b.edb0de7d Tue, Dec 12 2017 12:59:23.928, peer=46425, tc=6,
mintc=3, offset=0.209764, frequency=0.000, sys_jitter=2.308874,
clk_jitter=0.720, clk_wander=0.000
More information about the questions
mailing list