* Documentation on the binary file format?
@ 2009-01-29 18:24 M. Edward (Ed) Borasky
2009-01-30 7:39 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: M. Edward (Ed) Borasky @ 2009-01-29 18:24 UTC (permalink / raw)
To: linux-btrace
Is there some documentation on the binary file format out of "blktrace"?
I'm interested in writing some post-processing routines that extend what
"blkparse" and "btt" do, and there is a substantial disk space hit if I
generate the "blkparse" output and post-process that. I'm also
considering a network server that takes the binary data from a
"blktrace" client and does the analysis "on the fly", rather than saving
off a binary trace.
A side question ... how likely are changes in the binary format? The
language(s) I want to use -- Perl and/or Ruby -- are pretty flexible at
re-factoring to match format changes, but I'd like to have a clue on how
much maintenance activity I'm taking on.
--
M. Edward (Ed) Borasky
I've never met a happy clam. In fact, most of them were pretty steamed.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Documentation on the binary file format?
2009-01-29 18:24 Documentation on the binary file format? M. Edward (Ed) Borasky
@ 2009-01-30 7:39 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2009-01-30 7:39 UTC (permalink / raw)
To: linux-btrace
On Thu, Jan 29 2009, M. Edward (Ed) Borasky wrote:
> Is there some documentation on the binary file format out of "blktrace"?
> I'm interested in writing some post-processing routines that extend what
> "blkparse" and "btt" do, and there is a substantial disk space hit if I
> generate the "blkparse" output and post-process that. I'm also
> considering a network server that takes the binary data from a
> "blktrace" client and does the analysis "on the fly", rather than saving
> off a binary trace.
Look at blktrace_api.h, that basically defines the binary format and
API. In short, the binary trace is just a multiple of blk_io_trace{}
structures. Note that they are always in big endian format, so the
parser needs to convert them to machine local byte ordering first.
> A side question ... how likely are changes in the binary format? The
> language(s) I want to use -- Perl and/or Ruby -- are pretty flexible at
> re-factoring to match format changes, but I'd like to have a clue on how
> much maintenance activity I'm taking on.
Not very likely. If a new format is incompatible with existing tools,
the BLK_IO_TRACE_VERSION will change. So in your program, you basically
do:
if ((trace->magic & 0xff) != BLK_IO_TRACE_VERSION)
err;
for starters, and then later if you want to handle different versions,
you can just check for what version is reports and punt to the
appropriate handler.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-01-30 7:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-29 18:24 Documentation on the binary file format? M. Edward (Ed) Borasky
2009-01-30 7:39 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).