The NTP server provides the time source, and the client can access the UDP123 port of the NTP server to obtain the time to synchronize the local time.
Generally, the time provided by the NTP server comes from the upper-layer NTP server (multiple settings are recommended), rather than the local time of the server.
It can be set to use the server's local time as the time source, which is used when none of the upper-layer NTP servers are available.
When the NTP server is not set to use local time as one of the time sources, and none of its upper-level NTP servers are available, the NTP server will set itself to an unavailable state (it seems to have adjusted its own stratum to 16).
The client will decide whether to synchronize based on the status of the NTP server (not entirely based on the stratum value).
server 0.pool.ntp.org
server 1.pool.ntp.org #Set
the local time as the time source, and set the stratum of the local source to 8. If it is greater than 10, the windows client seems to give up synchronization.
server 127.127.1.0
fudge 127.127.1.0 stratum 8
When the client synchronization fails, you can use ntpdate -d ntp-server-ip to view the detailed process
Note the two values of Server dropped and stratum
Example 1:
Server dropped: Server has gone too long without sync
stratum 2
Example 2:
Server dropped: strata too high
stratum 16
Use watch ntpd -p on the server to view the status of the time source.
remote: upper-layer NTP server
refid: the upper layer of the upper layer NTP server
st:stratum
when: The time synchronization update operation was done a few seconds ago
poll:更新周期,单位秒,与minpoll、maxpoll的值有关,默认minpoll为6,则poll为2^6=64秒。
reach:已经向上层NTP服务器要求更新的次数,这里使用八进制,最大377,即255,之后会重置。注意:当所有时间源都达到377时,会启动重置,相当于重启NTP服务,此时若有客户端请求将会收到“no server suitable for synchronization found”的提示。大约五分钟后正常。
delay:网络延迟时间,单位ms
offset:与上层NTP服务器的时间差,单位ms
另外最左边符号表达:
*:正在作用当中的上层NTP
+:已经连成功,作为提花时间更新的候选者
x:不可用
ntpd不仅能够校准计算机的时间,而且能够校准计算机的时钟。
http://blog.csdn.net/suer0101/article/details/7868813
共同点:时间差小于128ms都是微调,大于1000s停止工作。
不同点: 渐进式调整一直使用微调,当时间差大于600s时使用更大的步进值; 跳跃式调整在时间差大于128ms时使用 跃式调整,对于跳跃式调整日志中有记录。
微调步进值:0.5ms/s,600s需要14天左右。
http://www.happyworld.net.cn/post/6.html
http://www.54chen.com/index.php?p=410
http://blog.chinaunix.net/uid-488742-id-2113855.html