1. Install Service
yum install ntpd ## to install ntp service, and this is not the same ntpdate Oh, this is better with
systemctl start ntpd.service ### to start the service
systemctl enable ntpd ### is set to boot from the start
the ntpq -p ### Synchronization View
2. Use the View information service
[root@localhost ~]# ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== +ntp.hkg10.hk.le 130.133.1.10 2 u 335 1024 377 4.610 -2.096 1.670 -ntp.xtom.com.hk 101.231.167.217 2 u 848 1024 377 131.824 61.379 1.579 +119.28.229.70 100.122.36.196 2 u 506 1024 373 12.149 - 0.120 2.213 * 119.28 . 230 190 100 122 . 36.4 2 to 1079 1024 377 10,977 - 3.269 4.752
Description:
* Indicates ntp server currently used , where the unit selected;
ST : i.e. stratum class, ntp serve smaller value indicates a higher accuracy;
When : a few seconds ago, the time synchronization update operations done;
Poll indicates, how many milliseconds to every ntp server synchronization time;
the REACH : NTP has the upper number of updates require the server;
Delay : network transfer delay time of the clock;
offset : time compensation result;
the Jitter : Linux system and BIOS time difference between the time of hardware time
Note: After the restart NTP server, the client wants to wait 5 minutes then its time synchronization, otherwise it will prompt "no server suitable for synchronization found" error (if the error would have been an error, so use ntpdate also explain udp123 port in question. firewall system can be stopped again. I am deeply convinced firewall limits ip, source port 123 port that is set to release a pass.). The waiting time can be monitored watch ntpq -p command.
3. The system time is written into the hardware bios time,
[root@localhost ~]# hwclock -w [root@localhost ~]# hwclock --show Mon 22 Jul 2019 11:50:51 AM CST -0.662035 seconds
Using this service is better, it will automatically find the server at regular intervals of time synchronization, ntpdate service, then you must specify the time server and does not automatically been updated.