2019-06-12 14:47:28 4269瀏覽
今天千鋒扣丁學(xué)堂Linux培訓(xùn)老師給大家分享一篇關(guān)于如何在Linux下確認(rèn)NTP是否同步的操作詳解,首先NTP意即網(wǎng)絡(luò)時(shí)間協(xié)議NetworkTimeProtocol,它通過網(wǎng)絡(luò)同步計(jì)算機(jī)系統(tǒng)之間的時(shí)鐘。NTP服務(wù)器可以使組織中的所有服務(wù)器保持同步,以準(zhǔn)確時(shí)間執(zhí)行基于時(shí)間的作業(yè)。NTP客戶端會(huì)將其時(shí)鐘與NTP服務(wù)器同步。
# ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== *CentOS7.2daygee 133.243.238.163 2 u 14 64 37 0.686 0.151 16.432
方法3:如何使用timedatectl命令檢查NTP狀態(tài)?# ntpstat synchronised to NTP server (192.168.1.8) at stratum 3 time correct to within 508 ms polling server every 64 s
# timedatectl 或 # timedatectl status Local time: Thu 2019-05-30 05:01:05 CDT Universal time: Thu 2019-05-30 10:01:05 UTC RTC time: Thu 2019-05-30 10:01:05 Time zone: America/Chicago (CDT, -0500) NTP enabled: yes NTP synchronized: yes RTC in local TZ: no DST active: yes Last DST change: DST began at Sun 2019-03-10 01:59:59 CST Sun 2019-03-10 03:00:00 CDT Next DST change: DST ends (the clock jumps one hour backwards) at Sun 2019-11-03 01:59:59 CDT Sun 2019-11-03 01:00:00 CST
# chronyc tracking Reference ID : C0A80105 (CentOS7.2daygeek.com) Stratum : 3 Ref time (UTC) : Thu Mar 28 05:57:27 2019 System time : 0.000002545 seconds slow of NTP time Last offset : +0.001194361 seconds RMS offset : 0.001194361 seconds Frequency : 1.650 ppm fast Residual freq : +184.101 ppm Skew : 2.962 ppm Root delay : 0.107966967 seconds Root dispersion : 1.060455322 seconds Update interval : 2.0 seconds Leap status : Normal
# chronyc sources 210 Number of sources = 1 MS Name/IP address Stratum Poll Reach LastRx Last sample =============================================================================== ^* CentOS7.2daygeek.com 2 6 17 62 +36us[+1230us] +/- 1111ms
【關(guān)注微信公眾號(hào)獲取更多學(xué)習(xí)資料】 【掃碼進(jìn)入Python全棧開發(fā)免費(fèi)公開課】
查看更多關(guān)于“Linux培訓(xùn)資訊”的相關(guān)文章>>