Discussion:
[chrony-users] Measuring system clock quality without setting system clock
Trent Piepho
2017-03-02 20:39:40 UTC
Permalink
Is there a way to get chrony to produce statistics on the clock quality,
without actually setting the clock?

I see the -Q option, but that only prints out the offset as a single
shot. I'd really like better data, as in what would be reported by
"tracking".

Is there some way to do this? Or some reason why it would not be
possible?

I'm developing an embedded Linux device which has a custom inertial
reference unit with a GPS. I have GPS time fixes (of rather
unimpressive latency and jitter), as well as a PPS signal (remains to be
seen how good it is) that is routed to an FPGA that is part of the SoC.
The integrated FPGA means I can in effect design a custom PPS device for
the SoC and then write a kernel pps driver for it. It will be
interesting to see if anything can be gained there.

In the final end use of the device, it won't be connecting to NTP
servers and won't be acting as one either. So I'd rather not install an
NTP server on it. It looks like with hardpps in the kernel it should be
possible to get a good clock without using an application like ntpd or
chrony.

Should be possible, but is it? And how good? Thus the desire to
measure the clock quality w.r.t. reference NTP servers, but not have
chrony actually discipline the system clock.
N�����r��y隊W!����ǫ�����-r��+n����\�� "�����r��z)���.n7��Z+��izf���k�|�������z�\��'�۱}���*+�����)���.n7�
Miroslav Lichvar
2017-03-03 07:59:25 UTC
Permalink
Post by Trent Piepho
Is there a way to get chrony to produce statistics on the clock quality,
without actually setting the clock?
I see the -Q option, but that only prints out the offset as a single
shot. I'd really like better data, as in what would be reported by
"tracking".
Is there some way to do this? Or some reason why it would not be
possible?
If you specify all sources with the noselect option, chronyd won't
touch the clock, but the skew and stddev printed by "chronyc
sourcestats" should still be useful.
Post by Trent Piepho
In the final end use of the device, it won't be connecting to NTP
servers and won't be acting as one either. So I'd rather not install an
NTP server on it. It looks like with hardpps in the kernel it should be
possible to get a good clock without using an application like ntpd or
chrony.
That could work. You will probably still need a program that would
bring the clock close to the right second and manage the kernel PPS
discipline. Depending on how good is the PPS signal and what are your
requirements on accuracy, it might be acceptable. Note that chronyd
can be compiled without support for NTP, CMDMON and RTC, which should
reduce the size of the chronyd binary by about third.
--
Miroslav Lichvar
--
To unsubscribe email chrony-users-***@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-***@chrony.tuxfamily.org
with "help" in the subject.
Trouble? Email ***@chrony.tuxfamily.org.
Loading...