sudo apt-get update sudo apt-get install ntp -y
可像 ntpdate 一樣,修正系統時間
要先關閉服務,不然會出現錯誤
service ntp stop ntpd -q tick.stdtime.gov.tw 或使用 ntpd -q time.google.com
更新完後,再打開服務
service ntp start
可使用 ntpq -p 來確認目前時間同步的狀況, 其中包含 delay, offset, jitter 的相關資訊.
root@pve1:~# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
0.debian.pool.n .POOL. 16 p - 64 0 0.000 0.000 0.000
1.debian.pool.n .POOL. 16 p - 64 0 0.000 0.000 0.000
2.debian.pool.n .POOL. 16 p - 64 0 0.000 0.000 0.000
3.debian.pool.n .POOL. 16 p - 64 0 0.000 0.000 0.000
*122-116-140-147 17.253.116.125 2 u 821 1024 377 4.249 1.304 1.156
-static.home.twn 133.243.238.243 2 u 551 1024 377 10.986 6.636 4.284
+t1.time.tw1.yah 119.160.254.155 2 u 914 1024 377 3.517 1.079 0.816
+220-133-209-83. 62.161.56.158 3 u 916 1024 377 3.721 1.132 0.742
-t2.time.tw1.yah 119.160.254.155 2 u 632 1024 377 2.606 0.475 0.417
-bbr.cxs.pw 242.71.143.169 2 u 1028 1024 377 5.625 -0.063 0.511
沒有留言:
張貼留言