[ntp:questions] How to measure computer clock error using PPS?

William Unruh unruh at invalid.ca
Wed Sep 3 14:34:44 UTC 2014


On 2014-09-03, Miroslav Lichvar <mlichvar at redhat.com> wrote:
> (hmm, it took over 3 months for this message to reach the list)
>
> On Tue, May 27, 2014 at 03:03:47PM +0400, Vladislav Ross wrote:
>> I have NTP server with Ublox LEA-6T GPS receiver. I want to determine my
>> server's oscillator accuracy and stability. I've read about Allan deviation 
>> and learnt how to make ADEV plot, but I don't fully understand how to
>> use this method.
>> 
>> My question is: what method should I use to determine server clock
>> accuracy and stability using PPS as reference? Can I use ntpd to collect
>> data about clock error? As far as I understand ntpd will adjust the
>> clock, but I need freely running clock.

You do not say what operating system you are using. You can use some
program to record the time of the pps pulse for a number of days and use
that to determine the Alan plot. 
Without pps, the timing is going to be dominated by instrument noise and
errors and your determination of the computer's time will be bad.
Alternatively use three roughly comparable computers and time them
against each other. Of course that might be dominated by correlated
errors esp in the long run, and that will not give a good estimate.


>
> You could use the "disable ntp" directive in ntp.conf to disable the
> clock discipline, but I'm not sure if ntpd will keep logging PPS
> offsets as the clock will be slowly drifting away.
>
> If you are on Linux, you might find the following tool useful:
>
> https://github.com/mlichvar/ppsallan
>
> It can be used like this:
>
> ppsallan -p adev.plot /sys/class/pps/pps0/assert
>
> This will collect raw PPS timestamps from the file in /sys and while
> it's running, a rough graph of Allan deviation will be shown in the
> console. On exit it will save the x, y coordinates of the plot to the
> file specified by -p and the plotallan script can be used to create a
> nice graph with gnuplot.
>



More information about the questions mailing list