linux主机安装配置chrony时间同步器
1.安装chrony,自行百度,或者下载安装包
2.配置阿里云同步器
server ntp.aliyun.com iburst
stratumweight 0
driftfile /var/lib/chrony/drift
rtcsync
makestep 10 3
bindcmdaddress 127.0.0.1
bindcmdaddress ::1
keyfile /etc/chrony.keys
commandkey 1
generatecommandkey
logchange 0.5
logdir /var/log/chrony
配置完成重启chrony客户端服务
systemctl restart chronyd
查看时钟源
[root@19201680560128 ~]# chronyc -n sources
210 Number of sources = 1
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* 203.107.6.88 2 6 377 26 +2117us[+2280us] +/- 27ms
查看时钟源同步参数
[root@19201680560128 ~]# chronyc -n tracking
Reference ID : CB6B0658 (203.107.6.88)
Stratum : 3
Ref time (UTC) : Thu Feb 20 05:20:33 2020
System time : 0.000113491 seconds slow of NTP time #这个就是看同步的时间差
Last offset : +0.000162896 seconds
RMS offset : 0.001041374 seconds
Frequency : 10.872 ppm fast
Residual freq : +0.048 ppm
Skew : 5.800 ppm
Root delay : 0.042800911 seconds
Root dispersion : 0.003054114 seconds
Update interval : 65.1 seconds
Leap status : Normal