chronyd不同步的坑处理

时间:2021-09-15
本文章向大家介绍chronyd不同步的坑处理,主要包括chronyd不同步的坑处理使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

发现chronyd配置好后,状态也可以,就是没有同步

systemctl status chronyd

这个时候查看手册

[root@POC_STRADE02 ~]# man chrony.conf |grep  maxdistance

maxdistance distance
The maxdistance directive sets the maximum allowed root distance of the sources to not be rejected by the source selection algorithm. The distance includes the accumulated dispersion, which might be large
when the source is no longer synchronised, and half of the total round-trip delay to the primary source.

By default, the maximum root distance is 3 seconds.

Setting maxdistance to a larger value can be useful to allow synchronisation with a server that only has a very infrequent connection to its sources and can accumulate a large dispersion between updates of
its clock.

[root@POC_STRADE02 ~]#

这段的坑是,当服务器重启后,读取硬件时钟的时间如果和chronyd同步的源时间相差3秒以上,就不会进行同步

需要再配置文件里最后一行加一段配置,

vim /etc/chrony.conf

加入如下,我设置的是600秒

maxdistance 600.0

原文地址:https://www.cnblogs.com/liqing1009/p/15272721.html