运行 CentOS 5.8 版
我在我修复的服务器上遇到了时间漂移问题 - 它没有同步 hwclock,因此在重新启动时 ntp 将关闭超过 1000 秒并且永远不会同步时间。
在调查问题时,我注意到 ntpd 定期与 Local(0) 同步。
“答案” - 您不需要使用 Undisciplined Local Clock,除非您想在连接到其他时间服务器失败时将此服务器用作本地时间服务器。
来自 ntpd 的日志消息:
Jul 20 03:47:49 localhost ntpd[5441]: synchronized to 110.14.8.1, stratum 3
Jul 20 04:21:06 localhost ntpd[5441]: synchronized to LOCAL(0), stratum 10
Jul 20 04:38:09 localhost ntpd[5441]: synchronized to 110.14.8.1, stratum 3
Jul 20 04:55:26 localhost ntpd[5441]: synchronized to LOCAL(0), stratum 10
Run Code Online (Sandbox Code Playgroud)
ntpd.conf:
# Use public servers from the pool.ntp.org project.
# …
Run Code Online (Sandbox Code Playgroud) ntpd ×1