Ntp

NTP 和輪詢值中的高抖動永遠不會超過 128

  • March 28, 2018

我有很多伺服器同步到相同的 NTP 伺服器 (4)。並非每台伺服器都在同一個 LAN 中。有些距離 NTP 伺服器 3 跳,有些距離 6 跳。

在幾台伺服器上,我看到輪詢值從未觸及 1024 標記,並且抖動值是兩位數。會不會是系統硬體的原因?這些是 Windows 伺服器(物理),需要盡可能準確的時間。請建議我應該怎麼做。

我從壞箱(距 ntp 伺服器 6 跳)手動收集的一些統計資訊

C:\Program Files (x86)\NTP>ntpq -p -n
remote      refid      st t when poll reach   delay   offset  jitter
==============================================================================
+*.*.*.25  *.*.*.233     2 u   12  128  377    1.210  -12.579  14.913
+*.*.*.26  *.*.*.233     2 u   96  128  377    1.067   -2.235   9.885
**.*.*.27  *.*.*.233     2 u   24  128  377    1.038   -7.569  11.178
+*.*.*.28  *.*.*.233     2 u   49  128  377    1.288  -11.058  14.544

remote      refid      st t when poll reach   delay   offset  jitter
==============================================================================
+*.*.*.25  *.*.*.233     2 u  124  128  377    0.614   -6.212   5.329
+*.*.*.26  *.*.*.233     2 u   93  128  377    0.910   -9.431   3.111
+*.*.*.27  *.*.*.233     2 u    1  128  377    0.824   -7.428   3.129
**.*.*.28  *.*.*.233     2 u   84  128  377    1.503   -8.230   3.511

remote      refid      st t when poll reach   delay   offset  jitter
==============================================================================
**.*.*.25  *.*.*.233     2 u  117  128  377    1.235   -4.084  11.405
+*.*.*.26  *.*.*.233     2 u   96  128  377    1.335  -11.813  13.130
+*.*.*.27  *.*.*.233     2 u  130  128  377    1.549  -14.036  16.381
-*.*.*.28  *.*.*.233     2 u   79  128  377    1.258   13.395  22.203

remote      refid      st t when poll reach   delay   offset  jitter
==============================================================================
**.*.*.25  *.*.*.233     2 u   88  128  377    1.235   -4.084  14.068
+*.*.*.26  *.*.*.233     2 u   63  128  377    1.335  -11.813  17.086
+*.*.*.27  *.*.*.233     2 u  103  128  377    1.549  -14.036  20.691
-*.*.*.28  *.*.*.233     2 u   47  128  377    1.258   13.395  20.231

remote      refid      st t when poll reach   delay   offset  jitter
==============================================================================
+*.*.*.25  *.*.*.233     2 u   47   64  377    0.652  -15.805  14.077
**.*.*.26  *.*.*.233     2 u   11   64  377    1.013  -14.423  11.375
-*.*.*.27  *.*.*.233     2 u   63   64  377    0.765   -2.030   7.680
+*.*.*.28  *.*.*.233     2 u    4   64  377    1.191  -17.980  14.393

remote      refid      st t when poll reach   delay   offset  jitter
==============================================================================
-*.*.*.25  *.*.*.233     2 u    3  128  377    1.576   18.665  21.999
+*.*.*.26  *.*.*.233     2 u   73  128  377    0.637   -5.012  14.405
**.*.*.27  *.*.*.233     2 u  127  128  377    0.272   -8.237  14.438
+*.*.*.28  *.*.*.233     2 u  123  128  377    1.190  -14.383  18.875

C:\Program Files (x86)\NTP>ntpdc -c loopinfo
offset:               -0.016430 s
frequency:            7.106 ppm
poll adjust:          18
watchdog timer:       133 s

offset:               -0.016430 s
frequency:            7.106 ppm
poll adjust:          18
watchdog timer:       341 s

offset:               -0.000149 s
frequency:            6.645 ppm
poll adjust:          0
watchdog timer:       383 s

offset:               0.015735 s
frequency:            6.725 ppm
poll adjust:          7
watchdog timer:       577 s

offset:               -0.010331 s
frequency:            6.748 ppm
poll adjust:          21
watchdog timer:       567 s

offset:               -0.009427 s
frequency:            6.687 ppm
poll adjust:          28
watchdog timer:       301 s

offset:               -0.007361 s
frequency:            6.612 ppm
poll adjust:          30
watchdog timer:       155 s

offset:               -0.008106 s
frequency:            4.358 ppm
poll adjust:          30
watchdog timer:       291 s

NTP.conf

# NTP configuration file

# Use drift file 
driftfile "C:\Program Files (x86)\NTP\ntp.drift"

# Logs
statistics loopstats peerstats clockstats
statsdir "C:\Program Files (x86)\NTP\logs\"     # directory for statistics files
filegen peerstats file peerstats type day enable
filegen loopstats file loopstats type day enable
filegen clockstats file clockstats type day enable
logfile "C:\Program Files (x86)\NTP\logs\syslog.txt"

# Use specific NTP servers
server *.*.*.25 minpoll 4 maxpoll 7 iburst
server *.*.*.26 minpoll 4 maxpoll 7 iburst
server *.*.*.27 minpoll 4 maxpoll 7 iburst
server *.*.*.28 minpoll 4 maxpoll 7 iburst

無法更換板子。修改了配置以頻繁輪詢,這很有幫助。

你是對的,當你硬編碼時 maxpoll 7,最大輪詢間隔永遠不會超過 128。請隨意送出你自己的答案,但無論哪種方式,請關閉這個問題。

引用自:https://serverfault.com/questions/599052