
10.01.2020 18:11, Carlos E. R. пишет:
Here you have poll interval in seconds:
host:~ # ntpq -np remote refid st t when poll reach delay offset jitter
==============================================================================
*xx.xx.x.xx 88.212.196.95 5 u 1 64 377 19.177 -0.042 0.331
I don't know how to get from there "your clock is 45 mS off".
Sorry? I said "here is poll interval" and poll interval *is* per server. If you have multiple servers each one can be polled with different interval. I did not say "here is your offset from reality".
And there is one line per server, so I don't know which is the one. I do know which one it is using as the upstream reference, yes, but ntp knows how much "off" is that one from "reality". I don't.
NTP does not know it. You misunderstand information that you get from NTP.
Here you have root dispersion (i.e. "precision") in milliseconds.:
host:~ # ntpq -c 'rv 0 rootdisp' rootdisp=128.295
Ok, that's better. It is 128 mS off, right?
No. It means that NTP cannot estimate correct time with better accuracy than 128ms. System may be having exactly correct time but NTP in this configuration has no way to reliably know it.
On my 24*7 miniserver:
Isengard:~ # ntpstat ; ntpq -c 'rv 0 rootdisp' synchronised to NTP server (194.80.204.184) at stratum 2 time correct to within 34 ms polling server every 1024 s rootdisp=6.888 Isengard:~ # ntpstat ; ntpq -c 'rv 0 rootdisp' synchronised to NTP server (194.80.204.184) at stratum 2 time correct to within 35 ms polling server every 1024 s rootdisp=7.128 Isengard:~ #
My desktop:
Telcontar:~ # ntpstat ; ntpq -c 'rv 0 rootdisp' synchronised to NTP server (85.199.214.102) at stratum 2 time correct to within 26 ms polling server every 1024 s rootdisp=4.773 Telcontar:~ # ntpstat ; ntpq -c 'rv 0 rootdisp' synchronised to NTP server (85.199.214.102) at stratum 2 time correct to within 26 ms polling server every 1024 s rootdisp=4.788 Telcontar:~ #
Results do not match. But frankly, ntpstat yields a result far easier to read.
Well, so it is quite possible that there are multiple implementations of ntpstat and each implementation chose to use different variables. Which basically makes usefulness of it exactly nil. It is also possible that ntpstat takes root dispersion from current synchronization source. My command gives "system variable", and I am not sure whether it is the same. You would need to check per-peer variables. I am also not sure what you need this information for. You seem to misinterpret result anyway.