Structured output?

Zev Weiss zev at bewilderbeest.net
Mon Feb 3 08:15:31 UTC 2014


I'm not sure how much use it'd be in another context, but for what it's worth I've written a partial parser for its current output format (assuming a few flags, 'strace -fqtttTv' basically) for a project of mine, a trace replayer called ARTC: https://research.cs.wisc.edu/wind/Software/artc/

So parsing it as-is is certainly feasible (though I had to add a small format-string fix at one point), but yeah, having a more easily parseable output format available would be quite nice...of those you listed I'd probably vote for JSON, though frankly as long as it's something other than XML I'd be happy.

One possible complication is how to handle multi-threaded (or multi-process) traces, where syscalls might "interrupt" each other in the output stream.  I guess the obvious options would be explicit entry/exit timestamps in the output and a semi-out-of-order output stream (i.e. output only on return), or special record types for submission vs. completion (analogous to what it's like now).


Zev

On Feb 2, 2014, at 2:39 PM, Philippe Ombredanne <pombredanne at nexb.com> wrote:

> Hi,
> I was wondering if there could be something to make parsing of a
> strace output a tad easier.
> 
> In fact even though not too complex, parsing a strace output can be
> almost as involved as the strace code that encodes the output itself.
> It could be a csv output or a json  or yaml ouput or something that
> would have some inherent structure that would make it easier to parse,
> so that a strace user that wants to interpret the output can focus on
> the interpretation of the data rather that having to handle the
> interpretation of the strace output first.
> 
> In that something that has been already discussed?
> Any thoughts?
> -- 
> Philippe Ombredanne
> 
> ------------------------------------------------------------------------------
> WatchGuard Dimension instantly turns raw network data into actionable 
> security intelligence. It gives you real-time visual feedback on key
> security issues and trends.  Skip the complicated setup - simply import
> a virtual appliance and go from zero to informed in seconds.
> http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
> _______________________________________________
> Strace-devel mailing list
> Strace-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/strace-devel





More information about the Strace-devel mailing list