Please try using "phc_ctl <iface_name> cmp".
Thanks,
Nemo
On Thursday, 7 September, 2023 at 05:48:19 am GMT-4, Florian Kauer
<[email protected]> wrote:
Hi Mehmet,
I am not aware of an API to specifically request the current offset directly
from phc2sys, but what you can do is to manually request the time from
CLOCK_TAI and the PHC and calculate the delta. Depends on your application if
that is sufficient (or even what you actually want in the first place), because
there is obviously the added latency between requesting the two clocks (and
that latency can even get completely messed up by power saving like ASPM).
See https://tsn.readthedocs.io/timesync.html for details and specifically
https://tsn.readthedocs.io/_downloads/f329e8dec804247b1dbb5835bd949e6f/check_clocks.c
for a tool that already includes several requests you might be looking for
(including the one above).
Greetings,
Florian
On 06.09.23 22:14, Mehmet Akbulut wrote:
> Hello,
>
> ptp4l offers a management interface based on the standard but is there a
> similar API to query state of phc2sys? Specifically looking to grab offset
> value, hopefully without parsing the logs.
>
> Sincerely,
> Mehmet Akbulut
>
>
> _______________________________________________
> Linuxptp-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/linuxptp-users
_______________________________________________
Linuxptp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-users
_______________________________________________
Linuxptp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-users