我有一个NTP设置(客户机-服务器关联),在客户机端,我在ntp.conf中有下面的行(除其他外):
# This should be maxclock 7, but the pool entries count towards maxclock.
tos maxclock 11
# Comment this out if you have a refclock and want it to be able to discipline
# the clock by itself (e.g. if the system is not connected to the network).
tos minclock 4 minsane 3
server <NTP server IP addr>因为,我只提供了一个NTP服务器&因为minsane值是3,所以选择服务器作为时钟选择算法的候选,但没有成为系统对等点。然而,我看到,时间仍然是同步的,最终在某个时候。我无法理解这种行为。我将客户端的时间延迟了30秒&同步花费了4+几个小时。"timedatectl“cmd中的O/p也显示系统时钟是同步的。但是,从ntpq程序中,rv命令的输出将系统状态字显示为:
status=c016 leap_alarm, sync_unspec, 1 event, restart,当然,在我的理解中还存在差距&如果有人能帮忙的话。提前感谢
根据NTPSec手册的定义:
This is the minimum number of candidates available to the clock selection algorithm in order to produce one or more truechimers for the clustering algorithm. If fewer than this number are available, the clock is undisciplined and allowed to run free.发布于 2023-05-08 16:47:30
这似乎是ntpsec生成配置文件(至少在debian和ubuntu上)的一个错误。minsane的默认值是1。如果设置的服务器较少,minsane 3将阻止服务器同步时间。
修复方法应该是删除tos行并使用默认值,或者将minsane 3更改为minsane 1。
https://unix.stackexchange.com/questions/741663
复制相似问题