Re: [ntp:questions] Precision changed after upgrade from ntp 4.2.4p4 to 4.2.6p2

2014-05-05 Thread David Taylor

On 04/05/2014 20:29, Caecilius wrote:

After upgrading ntp from 4.2.4p4 to 4.2.6p2 as part of a Linux upgrade
from Debian Lenny to Squueze, I've noticed that the precision variable
has changed from -20 to -22. So it appears that my clock has now got a
better precision. But the hardware is unchanged, and I'm running the
same kernel.

I thought the precision was dependent on the granularity of the
system clock, which I would have expected to be independent of the ntp
version and any other userland code.  Am I misunderstanding something
perhaps?

Here's the outputs of ntpq -c rv on both versions:


.. and what does the current development version (4.2.7p441) show?

--
Cheers,
David
Web: http://www.satsignal.eu

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Precision changed after upgrade from ntp 4.2.4p4 to 4.2.6p2

2014-05-05 Thread Miroslav Lichvar
On Sun, May 04, 2014 at 08:29:26PM +0100, Caecilius wrote:
 After upgrading ntp from 4.2.4p4 to 4.2.6p2 as part of a Linux upgrade
 from Debian Lenny to Squueze, I've noticed that the precision variable
 has changed from -20 to -22. So it appears that my clock has now got a
 better precision. But the hardware is unchanged, and I'm running the
 same kernel.
 
 I thought the precision was dependent on the granularity of the
 system clock, which I would have expected to be independent of the ntp
 version and any other userland code.  Am I misunderstanding something
 perhaps?

The older ntpd is probably using gettimeofday() which has microsecond
resolution (-20 in the log scale) and not the nanosecond
clock_gettime().

-- 
Miroslav Lichvar
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Precision changed after upgrade from ntp 4.2.4p4 to 4.2.6p2

2014-05-05 Thread Caecilius
On Mon, 5 May 2014 09:13:03 GMT, Miroslav Lichvar
mlich...@redhat.com wrote:

On Sun, May 04, 2014 at 08:29:26PM +0100, Caecilius wrote:
 After upgrading ntp from 4.2.4p4 to 4.2.6p2 as part of a Linux upgrade
 from Debian Lenny to Squueze, I've noticed that the precision variable
 has changed from -20 to -22. So it appears that my clock has now got a
 better precision. But the hardware is unchanged, and I'm running the
 same kernel.
The older ntpd is probably using gettimeofday() which has microsecond
resolution (-20 in the log scale) and not the nanosecond
clock_gettime().

Thanks.  That's exactly what's happening.

strace snippets show this for 4.2.6p2:

send(3, 29May  5 11:15:28 ntpd[9487]: ..., 86, MSG_NOSIGNAL) = 86
umask(0)= 022
umask(022)  = 0
getuid32()  = 0
clock_gettime(CLOCK_REALTIME, {1399284928, 331375894}) = 0
rt_sigaction(SIGHUP, {0x8058680, [], 0}, {SIG_DFL, [], 0}, 8) = 0

And this for 4.2.4p4:

send(3, 29May  5 11:06:46 ntpd[1724]: n..., 86, MSG_NOSIGNAL) = 86
umask(0)= 022
umask(022)  = 0
getuid32()  = 0
gettimeofday({1399284406, 133635}, NULL) = 0
rt_sigaction(SIGHUP, {0x8053aa0, [], 0}, {SIG_DFL}, 8) = 0

It looks like this change means that ntp is better able to know the
precision of the underlying clock.  I find that 4.2.4p4 always reports
-20 on a Linux system, both when it's running on real hardware and
also when it's running in a virtual machine on a windows host.

But 4.2.6p2 will report -22 for linux on real hardware, and -15 on a
vm under windows.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


[ntp:questions] Precision changed after upgrade from ntp 4.2.4p4 to 4.2.6p2

2014-05-04 Thread Caecilius
After upgrading ntp from 4.2.4p4 to 4.2.6p2 as part of a Linux upgrade
from Debian Lenny to Squueze, I've noticed that the precision variable
has changed from -20 to -22. So it appears that my clock has now got a
better precision. But the hardware is unchanged, and I'm running the
same kernel.

I thought the precision was dependent on the granularity of the
system clock, which I would have expected to be independent of the ntp
version and any other userland code.  Am I misunderstanding something
perhaps?

Here's the outputs of ntpq -c rv on both versions:

ntpq -c rv for ntp 4.2.4p4:

assID=0 status=06f4 leap_none, sync_ntp, 15 events,
event_peer/strat_chg,
version=ntpd 4.2.4p4@1.1520-o Sun Nov 22 17:34:54 UTC 2009 (1),
processor=i686, system=Linux/2.6.32.61-nta-20405, leap=00,
stratum=3, precision=-20, rootdelay=11.891, rootdispersion=82.127,
peer=60194, refid=178.18.118.13,
reftime=d700bca2.cf74a3b2  Tue, Apr 22 2014 11:02:10.810, poll=10,
clock=d700c225.252de5e0  Tue, Apr 22 2014 11:25:41.145, state=4,
offset=-0.307, frequency=-89.946, jitter=0.434, noise=0.266,
stability=0.029, tai=0

ntpq -c rv for ntp 4.2.6p2

associd=0 status=0615 leap_none, sync_ntp, 1 event, clock_sync,
version=ntpd 4.2.6p2@1.2194-o Sun Oct 17 13:45:13 UTC 2010 (1),
processor=i686, system=Linux/2.6.32.61-nta-20405, leap=00,
stratum=3,
precision=-22, rootdelay=31.619, rootdisp=60.232, refid=217.114.59.3,
reftime=d705fe90.065494fe  Sat, Apr 26 2014 10:44:48.024,
clock=d7060569.8677132b  Sat, Apr 26 2014 11:14:01.525, peer=6347,
tc=10,
mintc=3, offset=0.161, frequency=-89.952, sys_jitter=0.247,
clk_jitter=0.196, clk_wander=0.017

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions