ntpq输出说明

以一个阿里云VM上的输出为例


[root@CentOS ~]# ntpq -pn
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 127.127.1.0     .LOCL.          10 l    -   64    0    0.000    0.000   0.000
#2001:4860:4806: 71.79.79.71      2 u 1012 1024  357  280.158  -15.630   3.135
#2001:4860:4806: 71.79.79.71      2 u  816 1024  377  262.399  -24.971   2.702
#2001:4860:4806: 71.79.79.71      2 u  708 1024  377  364.687  -13.306   4.368
#2001:4860:4806: 71.79.79.71      2 u  606 1024  377  381.816  -28.115   3.897
*182.92.12.11    10.137.38.86     2 u  327 1024  377    0.245    0.810   0.792
+120.25.115.19   10.137.38.86     2 u  824 1024  377   35.800   -0.694   0.819
-120.25.115.20   10.137.38.86     2 u  411 1024  377   35.496    2.679   0.930
+120.25.108.11   10.137.38.86     2 u  947 1024  377   38.739    2.205   0.807
+115.28.122.198  10.137.38.86     2 u  753 1024  377   11.627    0.952   0.938
-10.143.33.49    10.143.0.44      3 u  818 1024  377   28.970   -1.337   0.805
+10.143.33.50    10.143.0.44      3 u  843 1024  377   32.689    0.179   0.832
+10.143.33.51    10.143.0.44      3 u  838 1024  377   32.612    0.252   0.848
+10.143.0.44     10.137.38.86     2 u  889 1024  377   25.149    0.277   0.786
+10.143.0.45     10.143.0.44      3 u  853 1024  377   32.282    0.468   0.808
#10.143.0.46     10.143.0.44      3 u  983 1024  377   29.398   -1.656   0.943

remote是远程ntp server的地址在remote前面有各种+ – x #等,也是有相应得含义的


x   discarded by intersection algorithm
.   discarded by table overflow (not used)
-   discarded by the cluster algorithm
+   included by the combine algorithm
#  backup (more than tos maxclock sources)
*   system peer
o   PPS peer (when the prefer peer is valid)

refid

association ID or kiss code

st

stratum层级,GPS为0级,GPS授时服务器为一级。最大不能超过15级。

t是peer类型


u: unicast or manycast client
b: broadcast or multicast client
l: local (reference clock)
s: symmetric (peer)
A: manycast server
B: broadcast server
M: multicast server

when

上一次收到包的时间间隔

poll

同步间隔2^n次方

reach

查询到得总次数

delay

往返延迟,单位是ms

offset

远程时间减去本机时间的差值,单位是ms。为正数说明本地时间比远程时间慢,为负数说明本地时间更快。

jitter

衡量远程服务器时间稳定的一个参数,越小说明远程时间偏差越小。

参考资源

  1. https://www.eecis.udel.edu/~mills/ntp/html/decode.html#peer
  2. https://www.eecis.udel.edu/~mills/ntp/html/ntpq.html
此条目发表在dns分类目录,贴了标签。将固定链接加入收藏夹。

发表回复