[ntp:questions] Quesiton about apparent change in reported round trip delay when ntpd is restarted

Charbonneau, André Andre.Charbonneau at nrc-cnrc.gc.ca
Mon Jun 8 18:46:00 UTC 2020


I'm seeing an odd behavior from ntpd and I would like to get some clarifications on this.  In seems that when I restart ntpd, there is a jump in the RTD it reports for the NTP servers it is pointing to (via "server <ntp_server_ip> noselect" entries in its config).

Here is the scenario:

I have an NTP stratum 2 server running, A, and I configure A to have a 'noselect' server entry pointing to NTP server B running on another system.  The reason I do this is because I want to query ntpd on A for some stats about B.  For example, in A's ntp.conf I have:

  server <IP_of_B> noselect maxpoll 4

To collect the stats of B, I run the following command on A:

  ntpq -n -c raw -c 'rv <assoc_id_of_B>'

and parse the 'offset=' and 'delay=' metrics as reported by the above command.  I do this periodically and store the collected data in a DB for plotting.

Below is an example of the ntpq output:

$ ntpq -n -c raw -c 'rv 26183'
Output set to raw
associd=26183 status=0x901d,
srcadr=***.***.**.51, srcport=123, dstadr=***.***.**.241, dstport=123,
leap=0, stratum=3, precision=-24, rootdelay=0.504, rootdisp=1.495,
refid=***.***.**.227, reftime=0xe288dace.78065e75,
rec=0xe288dc33.a3da50f1, reach=0xff, unreach=0, hmode=3, pmode=4,
hpoll=4, ppoll=4, headway=13, flash=0x1000, keyid=0, offset=0.047,
delay=0.336, dispersion=0.593, jitter=0.013, xleave=0.005,
filtdelay= 0.36 0.34 0.43 0.36 0.36 0.38 0.34 0.36,
filtoffset= 0.06 0.05 0.08 0.05 0.05 0.06 0.04 0.04,
filtdisp= 0.00 0.24 0.48 0.72 0.96 1.20 1.44 1.68

The thing that is puzzling me is when I restart ntpd on A, it seems like it causes a jump in the 'delay' of B, as reported by the ntpq command on A.  Attached is a graph of the collected delay and offset of B, which clearly shows the jump after I restarted ntpd on A around Jun 5 18:10 UTC.

I don't understand why there is a change in the reported round trip delay for B after the restart of ntpd on A.

Anyone else experienced this behavior before or might have some information on what could be the root cause of this?

I'm running ntpq 4.2.6p5 at 1.2349-o Fri Apr 13 12:52:30 UTC 2018
on CentOS Linux release 7.5.1804
Linux 3.10.0-862.3.2.el7.x86_64 #1 SMP Mon May 21 23:36:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux


More information about the questions mailing list