On Tue, Jan 12, 2021 at 08:06:01PM +0200, Vladimir Oltean wrote:
> 
> I'm looking for a way to block a shell script until phc2sys and ptp4l
> have reached within a certain offset from the grandmaster (say +/- 50 ns).
> Let's say I can write a program based on pmc which monitors the
> master_offset from TIME_STATUS_NP, but what about phc2sys?

We don't have any kind of management interface or IPC to phc2sys, but
you might try this from your shell script.

    $ phc_ctl -q eth6 cmp

    phc_ctl[326755.414]: offset from CLOCK_REALTIME is 111513ns

The script can evaluate that last word.

Thanks,
Richard



_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to