Mac OS X system is on by default the NTP service, that is, you can use any Mac OS installed computer as an NTP server, if not turned on please refer to my previous post to open it: http://asherwang.blog.51cto.com/ 11255017/1855135; my previous company used a MacBook Pro as an NTP server, but sometimes it might take some tweaking to make it work better.
1. Set up the correct update source
Before you take it as an NTP server, be sure to check that the update source it is updating is appropriate, because I find that sometimes Mac OS will set its NTP update source to: time.apple.com:
650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M01/98/49/wKioL1k5bq7hLTq9AAL8fA32sSM942.png-wh_500x0-wm_ 3-wmp_4-s_4020555545.png "title=" Time.apple.com.png "alt=" Wkiol1k5bq7hltq9aal8fa32ssm942.png-wh_50 "/>
And this update source is too far away from us, the system will not be updated at all; You can use Ntpq-p to view the status of the NTP service with the associated upper-level NTP:
$ ntpq-p Remote refID St T when poll reach delay offset jitter=================================== =========================================== ausyd2-ntp-001. . Xfac. 33h 1024 0 0.000 0.000 0.000
The relevant fields have the following meanings:
Remote: Is the IP or host name of the NTP update source host. In fact, the left should also have symbols:
If "*" represents an NTP update source that is currently in effect
If "+" means that the connection is successful, it can be used as a candidate for the next update.
refID: Refer to the NTP update source host address.
ST: is the Statum class, generally between 0-15 values.
When: The time that has been done a few seconds ago synchronizes the updated operation.
Poll: The next update is after a few seconds.
Reach: The number of times an update has been required to update the source.
Delay: The time of the network transmission delays, the unit is 10 minus 6 seconds.
Offset: The result of the time compensation, in units of 10 minus 3 seconds.
Jitter:linux the time difference between the system time and the BIOS hardware time, in units of 10 minus 6 seconds.
This shows that the update source is not enabled, the value of St is not correct, a request for updates are not. So we're going to change the update source to:
Time.asia.apple.com:
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M01/98/49/wKioL1k5bsrx9KQwAALzsul18IQ086.png-wh_500x0-wm_ 3-wmp_4-s_2230743651.png "title=" Time.asia.apple.com.png "alt=" Wkiol1k5bsrx9kqwaalzsul18iq086.png-wh_50 "/>
2, the above set up a suitable update source, not necessarily immediately will be able to provide services, NTP server itself or its server synchronization needs a time period, this process may be 5 minutes, the use of Linux CentOS6 as a client update will report the following error:
~]# ntpdate 192.168.10.1//My MAC address 7 June 13:15:20 ntpdate[8403]: no server suitable for Synchronization found
So we have to wait, or observe the value of reach, after starting the NTP server, this value will continue to grow from 0, when the increase to 17, from 0 to 17 is 5 times the change, each time is the value of poll seconds, is 64 seconds *5=320 seconds.
$ ntpq-p Remote refID St T when poll reach delay offset jitter=================================== ===========================================*jptyo5-ntp-002. . GPSs. 1 u 63 64 33 348.656-0.614 46.092
At this point the "*" number also appeared, reach value of 33, in the use of the client to update, it succeeded:
~]# ntpdate 192.168.10.1 8 June 22:27:01 ntpdate[8406]: Step time server 192.168.10.1 offset 119248.044293 sec
If you later synchronize NTP server from NTP Client also fails, use Ntpdate–d to query the specific error message, then make a determination.
Reference:
http://wangyou871228.blog.163.com/blog/static/27695152201379101059990/
"Bird Brother Linux Private dish-Server Erection" Chapter 15th
This article is from the "Wangjian it road!" "Blog, be sure to keep this provenance http://asherwang.blog.51cto.com/11255017/1933639
Mac OS X NTP service