On Thursday 03 July 2014, Carlos E. R. wrote:
On Thursday, 2014-07-03 at 11:35 +0200, Ruediger Meier wrote:
You can check the diff to ntpserver like this
$ sntp time.nrc.ca 3 Jul 11:26:13 sntp[7989]: Started sntp 2014-07-03 11:26:13.539189 (-0100) -0.008495 +/- 0.005508 secs 2014-07-03 11:26:13.670113 (-0100) -0.008351 +/- 0.006958 secs 2014-07-03 11:26:13.801026 (-0100) -0.008343 +/- 0.009430 secs
So in this example my local clock is about 8 ms ahead of ntp server (+/- correctness).
Note there are 3 lines output! One for each machine where time.nrc.ca resoves to.
cer@Telcontar:~> sntp time.nrc.ca 3 Jul 11:57:26 sntp[26307]: Started sntp 2014-07-03 11:57:27.147191 (-0100) +0.427058 +/- 0.005676 secs 2014-07-03 11:57:27.323066 (-0100) +0.295449 +/- 0.007294 secs 2014-07-03 11:57:27.498973 (-0100) +0.295515 +/- 0.007553 secs 3 Jul 11:57:27 sntp[26307]: Can't open KOD db file /var/db/ntp-kod for writing! cer@Telcontar:~>
Well, they do not agree with one another, here... about 0.13 second difference from the first one to the second one.
Also, I can see that ntp doesn't handle hibernation properly, looking at the log:
2 Jul 11:27:45 ntpd[8726]: 0.0.0.0 c618 08 no_sys_peer 3 Jul 00:36:56 ntpd[8726]: 0.0.0.0 0613 03 spike_detect +0.609002 s 3 Jul 00:42:37 ntpd[8726]: 0.0.0.0 061c 0c clock_step +0.604500 s 3 Jul 00:42:37 ntpd[8726]: 0.0.0.0 0615 05 clock_sync 3 Jul 00:42:38 ntpd[8726]: 0.0.0.0 c618 08 no_sys_peer 3 Jul 11:59:53 ntpd[8726]: 0.0.0.0 0613 03 spike_detect +0.301752 s
I have awakened the machine at 11:29.
Telcontar:~ # rcntp ntptimeset 3 Jul 12:02:31 sntp[26619]: Started sntp 2014-07-03 12:02:31.718722 (-0100) +0.297341 +/- 0.131897 secs Time synchronized with AmonLanc.valinor Telcontar:~ #
Now:
cer@Telcontar:~> sntp time.nrc.ca 3 Jul 12:02:56 sntp[26653]: Started sntp 2014-07-03 12:02:56.744866 (-0100) +0.001358 +/- 0.008820 secs 2014-07-03 12:02:56.992912 (-0100) -0.036150 +/- 0.005997 secs 2014-07-03 12:02:57.165804 (-0100) +0.001231 +/- 0.007751 secs 3 Jul 12:02:57 sntp[26653]: Can't open KOD db file /var/db/ntp-kod for writing! cer@Telcontar:~>
And those 3 time servers agree - this can not be. Even if my clock was off by .3 seconds, the difference to any good ntp server should be about the same, and can not change that lot with a measurement taken just five minutes later (I mean the difference between line and two, which is now 0.037S).
BTW you can also query your local ntp daemon for all used ntp servers. $ ntpq -p localhost remote refid st t when poll reach delay offset jitter ============================================================================== +homer.ga.local 130.149.17.21 2 u 286 1024 377 0.744 -2.952 0.299 *glaukos.ga.loca 130.149.17.21 2 u 294 1024 377 0.098 3.060 0.174 These offsets (in ms) may be more correct than sntp's because your ntpd is watching the servers for a long time and probably includes some statistics about correctness etc. Also you see that your ntpd is setting the time to some kind of average of all used ntp servers. cu, Rudi -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org