我在centos服务器上安装了ntp。
我修改了/etc/ntp.conf,将默认服务器条目替换为内部NTP服务器IP的一个条目(1.2.3.4是NTP服务器的IP ):
server 1.2.3.4 iburst当我重新启动服务器并运行ntpstat时,我会看到以下内容:
unsynchronised
polling server every 64 s然后运行sudo ntpdate 1.2.3.4并看到以下消息:
1 Dec 19:22:35 ntpdate[2339]: the NTP socket is in use, exiting然后我停止服务(systemctl stop ntpd)并再次运行sudo ntpdate 1.2.3.4来查看它成功地同步:
1 Dec 19:25:11 ntpdate[2351]: adjust time server 1.2.3.4 offset 0.005316 sec现在,当我启动服务并运行ntpstat时,我会看到以下消息:
synchronised to NTP server (1.2.3.4) at stratum 4
time correct to within 8065 ms
polling server every 64 s如果我现在重新启动并运行ntpstat,它会说是不同步的。我做错了什么?它应该自动同步到我放在配置文件中的NTP服务器的IP,对吗?
发布于 2015-12-02 14:21:09
看来我只是有点不耐烦了。重新启动之后,如果我等待大约6分钟并运行ntpstat,它将显示它是同步的。
投票间隔显示64岁的s,我认为这意味着每64个S就会进行一次投票,但看起来并不是那样的。
https://serverfault.com/questions/740126
复制相似问题