发现与ntp服务器同步后,间隔10秒再同步,系统时间与ntp服务器已经相差0.6秒,因此怀疑系统时钟被修改了
使用adjtimex调整
sudo apt install adjtimex
对比当前系统时钟
sudo adjtimex --compare
WARNING: CMOS time is 53.38 min behind system clock
--- current --- -- suggested --
cmos time system-cmos error_ppm tick freq tick freq
1706065329 3203.364760 9167 -2547515
1706065340 3202.447971 -91678.9 9167 -2547515
1706065351 3201.531015 -91695.6 9167 -2547515 10083 3718947
1706065362 3200.614203 -91681.2 9167 -2547515 10083 2773635
1706065373 3199.697403 -91680.0 9167 -2547515 10083 2695510
1706065384 3198.780514 -91688.9 9167 -2547515 10083 3278322
修改系统时钟(10000是默认值)
sudo adjtimex --tick 10000
WARNING: CMOS time is 53.23 min behind system clock
--- current --- -- suggested --
cmos time system-cmos error_ppm tick freq tick freq
1706065453 3194.725811 10000 -2547515
1706065463 3194.725257 -55.4 10000 -2547515
1706065473 3194.724763 -49.4 10000 -2547515 10000 689985