Thanks, you’re right, the pmc tool might be the right place to do this, but it 
doesn’t seem to actually solve the problem? 

The output of the pmc tool is still unstructured text. So to feed it into a 
script I would still need to write an output parser of some sort and I would 
have to guess that my parser covers all of the cases that the tool might 
generate and I would have to assume that the output format doesn’t change. This 
is what got me thinking about structuring the output format somehow in a way 
that any tool could consume it. 

> but in binary format.
> I recommend using that instead of log scraping.


I don’t see any binary output option. Seems to be text only? 

> I'm no friend of json.

Nor am I. Will happily take any suggestions. It just seems to be the de facto 
standard these days. Much better than XML or CSV 

> The logging is meant for human eyes only.

I have no intention of breaking that. It’s useful to be able to read the logs 
as a human. But if you have more than a few instances (think 100+ instances 
running in a datacenter) then human reading all the logs is not a sustainable 
solution. In that case, it’s much better if all the logs can be fed into a 
central place and processed looking for anomalies and/or errors. 

M


> On 22 Jul 2020, at 13:14, Richard Cochran <richardcoch...@gmail.com> wrote:
> 
> On Wed, Jul 22, 2020 at 12:42:52PM +1000, mgrosve...@gmail.com wrote:
>> Hi all,
>> I’ve been thinking about how include Linux PTP in a larger project that I’m 
>> working on. 
>> 
>> To do so I could write a bunch of regex parsing magic to parse up the Linux 
>> PTP output (and hope that I get it right for all the cases that matter). But 
>> it got me thinking that probably maybe there’s broader problem to be solved 
>> here. 
> 
> What is the broader problem that you are trying to solve?
> 
>> I’ve been wondering about adding a structured machine readable output option 
>> to Linux PTP? Probably JSON formatted because of the ubiquitous nature of 
>> the format(sigh). 
>> 
>> Is anyone working on this already? If not any major objections if I do? 
> 
> I'm no friend of json.
> 
> The logging is meant for human eyes only.
> 
> The "machine readable" output is the management interface.  It
> provides a super-set of the logging information, but in binary format.
> I recommend using that instead of log scraping.
> 
> Thanks,
> Richard
> 



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

Reply via email to