2014-02-12 34 views
1

我工作的一個項目,我需要找出最大偏移的NTP同步時鐘可以從UTC偏移誤差。NTP從實時

如果我運行ntpdc -c loopinfo它輸出的偏移,這是從實際時間偏移誤差?

也如果我運行命令ntpq -p它會爲每個同行表現出偏差,這是什麼偏差?

其中哪些我可以用它來找到實時的最大偏移誤差?

謝謝。

回答

1

我認爲你正在尋找ntpq -c kerninfontptime

$ ntpq -c kerninfo 
associd=0 status=0615 leap_none, sync_ntp, 1 event, clock_sync, 
pll offset:   0.336481 
pll frequency:   -32.762 
maximum error:   0.136773 
estimated error:  0.000231 
kernel status:   pll nano 
pll time constant:  10 
precision:    1e-06 
frequency tolerance: 500 
pps frequency:   0 
pps stability:   0 
pps jitter:   0.000 
calibration interval 4 
calibration cycles: 0 
jitter exceeded:  0 
stability exceeded: 0 
calibration errors: 0 

的輸出或ntptime使用:

S ntptime 
ntp_gettime() returns code 0 (OK) 
time d6a66a56.372c300c Wed, Feb 12 2014 16:47:02.215, (.215518749), 
maximum error 141773 us, estimated error 231 us, TAI offset 35 
ntp_adjtime() returns code 0 (OK) 
modes 0x0(), 
offset 335.660 us, frequency -32.762 ppm, interval 4 s, 
maximum error 141773 us, estimated error 231 us, 
status 0x2001 (PLL,NANO), 
time constant 10, precision 0.001 us, tolerance 500 ppm, 
pps frequency 0.000 ppm, stability 0.000 ppm, jitter 0.000 us, 
intervals 0, jitter exceeded 0, stability exceeded 0, errors 0. 
+0

謝謝你的迴應DFC。我仍然對ppl偏移有所懷疑。這是服務器和客戶端之間的時間差嗎?或者它是客戶端和分層服務器之間的時差?什麼是最大錯誤呢? – user3302253

+0

我遇到了您的術語問題。什麼是「ppl偏移」? 「服務器和客戶端」和「客戶端和階層服務器」有什麼區別? – dfc

+0

嗨,我很抱歉混淆,我的意思是pll抵消。當我說客戶端的時候,我的意思是我的機器運行一個ntpd嘗試與第2層服務器同步。我想知道ntpdc -c kerninfo給出的偏移量是我的機器和第2層服務器之間的時間差還是它是我的機器和第1層服務器。 – user3302253