我正在配置一个NTP服务器,以同步Linux和Windows这两个系统上的时间。我正在使用CentOS 7和Windows 2012。
在/etc/ntp.conf中,我设置Windows地址而不是默认值。
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
server example.com因此,我输入了ntpq -p,但它似乎不能正常工作。在refid列中,没有IP地址,我也看不到*。在这两个系统中,甚至时间也不一样。
[root@ ~]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
example.com .LOCL. 1 u 3 64 377 1.056 5760156 6.457意思是,我想上面的结果应该是(?)或者必须显示如下,不是吗?
[root@ ~]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*example.com 192.168.x.x 1 u 3 64 377 1.056 5760156 6.457我该怎么做才能修好?当我停止ntpd和输入ntpdate example.com时,同步似乎是有效的。我能得到正确的时间。这个可以吗??
此外,我在chkconfig --list中看不到任何ntp配置。可以吗?
[root@ ~]# chkconfig --list
Note: This output shows SysV services only and does not include native ...
jexec 0:off 1:on 2:on 3:on 4:on 5:on 6:off
netconsole 0:off 1:off 2:off 3:off 4:off 5:off 6:off
network 0:off 1:off 2:on 3:on 4:on 5:on 6:off发布于 2018-06-25 03:49:13
在"refid“列中,没有IP地址。
不一定非得是IP。该列仅显示系统用作其时钟源的内容。如果它是另一个NTP服务器,它将是一个IP。但是对于具有本地时钟源的系统来说,它可能是另一回事。.LOCL。仅仅意味着系统使用本地时钟作为源。这通常是不建议的,除非作为后盾,因为通常没有同步来保持它的正确性。
这只钟与你的钟相抵96分钟。
由于时钟未关闭,守护进程可能需要等待一段时间才能信任源。过一段时间,它应该会改变时钟。如果您将iburst关键字添加到服务器行中(并使用-g选项启动守护进程以允许其在输出超过1000 s时同步),则应该立即执行此操作。
https://unix.stackexchange.com/questions/451669
复制相似问题