Re: [Linuxptp-devel] Machine Readable Output

2020-10-27 Thread Matthew P. Grosvenor
Thanks for this. I just ended up writing a log parser for the ptp4l output which did the job as well. The current output contains exactly the outputs that I wanted/needed. The reason for asking here was to see if there was more value that I could add by making this sort of thing available to t

Re: [Linuxptp-devel] Machine Readable Output

2020-10-27 Thread Richard Cochran
On Wed, Jul 22, 2020 at 06:16:01AM -0700, Richard Cochran wrote: > On Wed, Jul 22, 2020 at 02:14:48PM +1000, Luke Howard wrote: > > [resending from correct email] > > > > > The output of the pmc tool is still unstructured text. So to feed it into > > > a script I would still need to write an outp

Re: [Linuxptp-devel] Machine Readable Output

2020-07-28 Thread Richard Cochran
On Sun, Jul 26, 2020 at 12:34:00PM +1000, Matthew P. Grosvenor wrote: > This is exactly what I’m trying to avoid: committing the cardinal > sin of open source. If the project doesn’t do exactly what you need, > just write yet-another similar but different implementation written > in yet-another lan

Re: [Linuxptp-devel] Machine Readable Output

2020-07-27 Thread Jacob Keller
On 7/25/2020 7:34 PM, Matthew P. Grosvenor wrote: > >> The messages are standardized and use TLV format so writing your own >> send/receive bits would not be too difficult. Plus, if you don't mind >> GPL you can just simply fork and port pmc into whatever language you >> prefer. > > This is exa

Re: [Linuxptp-devel] Machine Readable Output

2020-07-25 Thread Matthew P. Grosvenor
> The messages are standardized and use TLV format so writing your own > send/receive bits would not be too difficult. Plus, if you don't mind > GPL you can just simply fork and port pmc into whatever language you prefer. This is exactly what I’m trying to avoid: committing the cardinal sin of op

Re: [Linuxptp-devel] Machine Readable Output

2020-07-22 Thread Jacob Keller
On 7/22/2020 5:07 PM, Richard Cochran wrote: > On Thu, Jul 23, 2020 at 09:57:35AM +1000, Luke Howard wrote: >> Possibly an extension to pmc(8) for emitting JSON would better suit your use >> case, depends on how your application is structured I guess? > > You can pipe the pmc output through a

Re: [Linuxptp-devel] Machine Readable Output

2020-07-22 Thread Richard Cochran
On Thu, Jul 23, 2020 at 09:57:35AM +1000, Luke Howard wrote: > Possibly an extension to pmc(8) for emitting JSON would better suit your use > case, depends on how your application is structured I guess? You can pipe the pmc output through a script (python, etc) that emits json. That might cover s

Re: [Linuxptp-devel] Machine Readable Output

2020-07-22 Thread Luke Howard via Linuxptp-devel
>> But my point was to use the actual binary management TLVs, i.e. the >> messages that pmc turns into text. > > I don’t follow this. How would my script get access to the management TLVs? > It sounds like you’re suggesting that I reimplement PMC in my own > application? You can take pmc.c a

Re: [Linuxptp-devel] Machine Readable Output

2020-07-22 Thread mgrosvenor
> But my point was to use the actual binary management TLVs, i.e. the > messages that pmc turns into text. I don’t follow this. How would my script get access to the management TLVs? It sounds like you’re suggesting that I reimplement PMC in my own application? > On 22 Jul 2020, at 23:16, Rich

Re: [Linuxptp-devel] Machine Readable Output

2020-07-22 Thread Richard Cochran
On Wed, Jul 22, 2020 at 02:14:48PM +1000, Luke Howard wrote: > [resending from correct email] > > > 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

Re: [Linuxptp-devel] Machine Readable Output

2020-07-21 Thread Luke Howard via Linuxptp-devel
[resending from correct email] > 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 a

Re: [Linuxptp-devel] Machine Readable Output

2020-07-21 Thread Matthew P. Grosvenor
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 th

Re: [Linuxptp-devel] Machine Readable Output

2020-07-21 Thread Richard Cochran
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

[Linuxptp-devel] Machine Readable Output

2020-07-21 Thread mgrosvenor
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’