On 10/01/2020 15.15, Andrei Borzenkov wrote:
On Fri, Jan 10, 2020 at 4:40 PM Carlos E. R. <> wrote:
Hi,
I looked on google and several places tell to use "ntpstat" to verify the clock. Now, ntpstat is not available on openSUSE (I tried "osc se -s ntpstat" and "cnf ntpstat").
So in openSUSE one has to build it on our own. I wonder why, when so many documents say to use it. :-? Ok, I compiled it, thanks.
<https://www.cyberciti.biz/faq/linux-unix-bsd-is-ntp-client-working/>
Sample outputs:
synchronised to NTP server (149.20.54.20) at stratum 3 time correct to within 42 ms polling server every 1024 s
Now, as ntpstat is nowhere to be found, how can I know what is the actual time difference between my computer clock and reality?
Define reality.
GPS :-)
No, ntpq doesn't say.
Of course it does. Both poll interval and root dispersion which is what ntpstat prints.
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". 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.
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? 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. -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)