Table of Contents

NTP Debugging

https://www.timeanddate.com/worldclock/

https://rags.wordpress.com/2011/10/17/how-to-debug-ntp-issues/

https://kb.netapp.com/app/answers/answer_view/a_id/1033534/~/how-to-troubleshoot-ntp-synchronization-issues-in-data-ontap-8-and-later

Look at a specific NTP server (without actually resetting time) with the ntpdate command.

ntpdate -d 0.us.pool.ntp.org

ntpd

Config file is in /etc

/etc/ntp.config

ntpq

To quickly show peers

nptq -p

To run in interactive mode:

ntpq

An example of a good NTP session

ntpq> peers

     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+time.cloudflare 10.27.8.67       3 u   60 1024  377   30.157   -0.260   1.974
*173.0.48.220.re 43.77.130.254    2 u  233 1024  377   98.768    4.673   4.253
+vf1.bbnx.net    252.74.143.178   2 u  826 1024  277  107.776    3.096  17.921
-clock.team-cymr 132.163.96.1     2 u  837 1024  377   59.642   -2.689   3.987

The first character in each row indicates the fate of this peer in the clock selection process. The valid characters are:

SPACE  Discarded due to high stratum and/or failed sanity checks.
x      Designated falsticker by the intersection algorithm.
.      Culled from the end of the candidate list.
-      Discarded by the clustering algorithm.
+      Included in the final selection set.
#      Selected for synchronization; but distance exceeds maximum.
*      Selected for synchronization.
o      Selected for synchronization, pps signal in use.    

To show associations

ntpq> as

ind assid status  conf reach auth condition  last_event cnt
===========================================================
  1 19963  9434   yes   yes  none candidate   reachable  3
  2 19964  961a   yes   yes  none  sys.peer    sys_peer  1
  3 19965  941a   yes   yes  none candidate    sys_peer  1
  4 19966  931a   yes   yes  none   outlyer    sys_peer  1

Peer Status Codes

The rv command shows more details for an association. To get info on a specific association use “rv 'assid'”

ntpq> rv 19964

associd=19964 status=961a conf, reach, sel_sys.peer, 1 event, sys_peer,
srcadr=173.0.48.220.reverse.wowrack.com, srcport=123,
dstadr=192.168.100.81, dstport=123, leap=00, stratum=2, precision=-24,
rootdelay=20.874, rootdisp=35.629, refid=43.77.130.254,
reftime=e25419e2.6ff48f64  Wed, Apr 29 2020 10:21:06.437,
rec=e2541dc2.d8214bd8  Wed, Apr 29 2020 10:37:38.844, reach=377,
unreach=0, hmode=3, pmode=4, hpoll=10, ppoll=10, headway=0, flash=00 ok,
keyid=0, offset=4.673, delay=98.768, dispersion=19.501, jitter=4.253,
xleave=0.095,
filtdelay=    99.63   98.77   97.12   98.51  118.91   98.62   98.35   95.17,
filtoffset=    6.08    4.67    4.72    5.62   15.58    5.72    4.44    2.78,
filtdisp=      0.00   15.92   31.82   47.25   63.18   78.65   94.28  109.98

Flash Status Codes

An example of a bad NTP session

ntpq> peers

     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 lofn.fancube.co 128.252.19.1     2 u  37m   64    0    0.000    0.000   0.000
 mx.danb.email   216.218.254.202  2 u  45m   64    0    0.000    0.000   0.000
 mis.wci.com     164.67.62.194    2 u  154   64  104   56.185  8110.21 8110.21
 ntp3.junkemailf 216.218.254.202  2 u 1198   64    0    0.000    0.000   0.000
ntpq> as

ind assid status  conf reach auth condition  last_event cnt
===========================================================
  1 39351  8033   yes    no  none    reject unreachable  3
  2 39352  8033   yes    no  none    reject unreachable  3
  3 39353  9064   yes   yes  none    reject   reachable  6
  4 39354  8073   yes    no  none    reject unreachable  7
ntpq> rv 39351

associd=39351 status=8033 conf, sel_reject, 3 events, unreachable,
srcadr=lofn.fancube.com, srcport=123, dstadr=198.89.126.181, dstport=123,
leap=00, stratum=2, precision=-20, rootdelay=22.675, rootdisp=27.863,
refid=128.252.19.1,
reftime=e2540b8e.030f1a31  Wed, Apr 29 2020 14:19:58.011,
rec=e2540df7.90dbfac8  Wed, Apr 29 2020 14:30:15.565, reach=000,
unreach=13, hmode=3, pmode=4, hpoll=10, ppoll=6, headway=0,
flash=1400 peer_dist, peer_unreach, keyid=0, offset=0.000, delay=0.000,
dispersion=15937.500, jitter=0.000, xleave=0.030,
filtdelay=     0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00,
filtoffset=    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00,
filtdisp=   16000.0 16000.0 16000.0 16000.0 16000.0 16000.0 16000.0 16000.0

The flash codes in the rv command output give the reason for the ntp source to get rejected :

flash=1400 peer_dist

ntpdc