Re: [Linuxptp-users] phc2sys: Obtain current accuracy values via tool - not by parsing log file
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Richard C. <ric...@gm...> - 2015-01-07 16:07:46
|
On Wed, Jan 07, 2015 at 12:35:19PM +0000, Koehrer Mathias (ETAS/ESW5) wrote: > Is it possible to get these values from phc2sys directly without the need to parse the logfile? We don't have any other interface for phc2sys. You could monitor the output with your own program or script, starting phc2sys with '-m' and piping the output, eg: phc2sys -q -m 2>&1 | my_monitor_program > The background of the question is that I have to wait for the start of my proprietary application until the clocks of the PCs run in a well synchronized state. > Or what is the recommendation for this use case? I guess that you also want to know the state of ptp4l, because the slave side will have to wait for the PHC to get the master's time. I think it is hard to offer a general solution to the problem of knowing whether a distributed application is ready to start, because applications define "ready" in different ways. However, I also think all of the information needed to decide that the system is "ready" is available. You just need to integrate these inputs into your own application. Maybe the phc2sys status could be offered in a more convenient way... patches are welcome! Thanks, Richard PS It sounds like phc2sys's new "automatic mode" might interest you: phc2sys -a -rr |