gpt4 book ai didi

ntp - 确定 NTP 调节的系统时钟精度

转载 作者:行者123 更新时间:2023-12-04 20:21:25 36 4
gpt4 key购买 nike

我可以使用 ntpq 查询本地 NTP 守护程序以获取系统变量。例如:

$ ntpq -c rv          
associd=0 status=0615 leap_none, sync_ntp, 1 event, clock_sync,
version="ntpd 4.2.6p5@1.2349 Fri Nov 7 20:40:06 UTC 2014 (1)",
processor="armv7l", system="Linux/4.5.0-00348-g4c53e80", leap=00,
stratum=3, precision=-19, rootdelay=12.456, rootdisp=63.660,
refid=195.219.205.9,
reftime=dd9b0a27.3e1d46de Wed, Oct 25 2017 13:03:35.242,
clock=dd9b0da9.5274cdfc Wed, Oct 25 2017 13:18:33.322, peer=14326,
tc=10, mintc=3, offset=6.178, frequency=29.679, sys_jitter=0.409,
clk_jitter=1.189, clk_wander=0.154

我想确定系统时间的准确度(相对于根时钟)。也就是说,什么是错误窗口?例如,它是由 offset = 6.178 => accuracy +/-6.178 ms 给出的,还是偏移量有其他含义?

还有许多其他 NTP 问题似乎涉及到这个主题,但似乎没有一个问题能够完全解决这个问题。

更新

在没有任何答案的情况下,并阅读了各种评论,包括 user3788685 引用的评论,我并不接近真相。

一种可能的解释是根色散是最好的度量,在上面的示例中表明精度为 ±63.7 ms。另一个建议偏移量(+6.2 ms)。从外部观察可以清楚地看出,实际精度肯定比 64 毫秒要好得多,但我没有工具可以更准确地测试它。

最佳答案

NTP Glossary很有用。

准确地说,我假设你在问,“在任何给定时刻,我的时钟离正确时间有多远”。随着时钟频率的变化,这将每分钟都在变化 - 抖动和稳定性等指标适用。您可能对 ntp 在您的时钟和根时钟之间发现的差异更感兴趣 - 诸如瞬时时间差的偏移量以及频率差异的偏差和漂移等指标。

我个人忽略这些并使用ntpstat .

ntpstat will report the synchronisation state of the NTP daemon running on the local machine. If the local system is found to be synchronised to a reference time source, ntpstat will report the approximate time accuracy.



它提供输出
synchronised to NTP server (14.202.204.182) at stratum 2 
time correct to within 26 ms
polling server every 128 s

这比试图完全理解 NTP 更让我头疼。

关于ntp - 确定 NTP 调节的系统时钟精度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46933825/

36 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com