Discussion:
[Linuxptp-devel] how to measure frequency offset without correcting?
Keller, Jacob E
2015-03-26 22:28:58 UTC
Permalink
Hey,

I am attempting to use phc2sys and debug some new hardware, and I want
to be able to sort of "free-running" mode measure the difference clock
offset and frequency offset, but without actually passing corrections.

Is there a way to do this? The reason for this is that I believe that my
adjfreq function is not correct, so I don't want it to be run, and I
would like to be able to see if software can get some sort of measure of
how fast my clock is running. I think it's possible my base frequency is
incorrect right now.

Regards,
Jake
Gary E. Miller
2015-03-26 22:37:34 UTC
Permalink
Yo Jacob E!

On Thu, 26 Mar 2015 22:28:58 +0000
Post by Keller, Jacob E
I am attempting to use phc2sys and debug some new hardware, and I want
to be able to sort of "free-running" mode measure the difference clock
offset and frequency offset, but without actually passing corrections.
You can try to set the ntpd refclock as noselect. I find ntpd will still
select the clock sometimes. So I'll add a huge fudge, like 1000, but
even that does not always work if this refclock is the only one sane.

If you are masochistic you can send phc2sys to a SHM, but not tell ntpd
it is a refclock. Pull the raw SHM data using a program like ntpshmmon
from the gpsd package. It is not to hard to parse after that.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97701
***@rellim.com Tel:+1(541)382-8588
Richard Cochran
2015-03-27 09:31:03 UTC
Permalink
Post by Keller, Jacob E
I am attempting to use phc2sys and debug some new hardware, and I want
to be able to sort of "free-running" mode measure the difference clock
offset and frequency offset, but without actually passing corrections.
If you have a reasonably good GM, and you trust the device's time stamps,
then one easy way is to just use ptp4l with the free_running option. You
can set the observation window with the freq_est_interval option.

HTH,
Richard
Keller, Jacob E
2015-03-27 22:10:14 UTC
Permalink
-----Original Message-----
Sent: Friday, March 27, 2015 2:31 AM
To: Keller, Jacob E
Subject: Re: [Linuxptp-devel] how to measure frequency offset without
correcting?
Post by Keller, Jacob E
I am attempting to use phc2sys and debug some new hardware, and I
want
Post by Keller, Jacob E
to be able to sort of "free-running" mode measure the difference clock
offset and frequency offset, but without actually passing corrections.
If you have a reasonably good GM, and you trust the device's time stamps,
then one easy way is to just use ptp4l with the free_running option. You
can set the observation window with the freq_est_interval option.
HTH,
Richard
When I tried that it still seemed to modify the PTP clock. At any rate, I tried Gary's suggestion which worked well.. Turns out the clock is about 2300 ppm(!!) off according to chronyd

Thanks for the suggestions!

Regards,
Jake

Loading...