出于教育目的,我想追踪 NTP 服务器链,例如 0.de.pool.ntp.org 回到第 1 层 NTP 服务器。我怎样才能做到这一点?
我找到了 ntptrace,但它不起作用:
/home/xyzdragon# ntptrace
localhost: stratum 2, offset -0.009285, synch distance 0.010221
192.53.103.104: timed out, nothing received
***Request timed out
Run Code Online (Sandbox Code Playgroud)
我尝试/usr/bin/ntptrace通过手动重现该 Perl 脚本的步骤进行调试:
home/xyzdragon# ntpq -n
ntpq> pe
remote refid st t when poll reach delay offset jitter
==============================================================================
+78.47.249.19 56.1.129.236 3 - 129 128 376 27.339 14.405 12.857
ntpq> host 78.47.249.19
current host set to 78.47.249.19
ntpq> pe
78.47.249.19: timed out, nothing received
***Request timed out
Run Code Online (Sandbox Code Playgroud)
其实ntptrace使用的组合rv和pstat,而不是pe命令ntpq命令。
经过多次尝试使其与 ntpq 一起使用后,我只使用了一种解决方法:
server 56.1.129.236(跳过 78.47.249.19)到/etc/ntp.confsudo service ntp restart这适用于跟踪 NTP 链,但非常繁琐。因此,我的问题是:
ntpq只跟踪 NTP 服务器链?小智 3
从 ntptrace 的手册页:
ntptrace 是一个 Perl 脚本,它使用 ntpq 实用程序来跟踪从给定主机到主时间源的 NTP 服务器链。为了使 ntptrace 正常工作,这些服务器中的每一个都必须实现 RFC 1305 中指定的 NTP 控制和监视协议并启用 NTP 模式 6 数据包。
| 归档时间: |
|
| 查看次数: |
1796 次 |
| 最近记录: |