[systemtap patch] Experimental systemtap integration of 'blktrace transport'

Tom Zanussi zanussi@us.ibm.com
Thu Oct 5 23:31:00 GMT 2006


This is a patch to the 0930 systemtap snapshot that adds the ability
to have systemtap log its data using the 'blktrace transport'.  You'll
need to apply the accompanying kernel and user 'blktrace transport'
patches, then apply this to systemtap.  Once you've done that, you can
run a probe with the -l option:

# stap -l transport1.stp

The output will appear in currprobe.systemtap.X, one for each cpu,
with X replaced by the cpu id.  To get the human-readable merged
version, run stp_parse with 'currprobe' as the arg:

# stp_parse currprobe

Which will display the output to stdout.

To use in 'live mode', where the data is parsed and displayed as it
comes in, you can have stap send the output to stdout using '-o -'
option and pipe that output to stp_parse with the '-i -' option:

# stap -l -o - transport1.stp | stp_parse -i -

You can also have the per-cpu output sent over the network using the
-n option.  First start the stp_server:

# stp_server
server: waiting for connections...

Then start the trace:

# stap -l -n localhost transport1.stp
systemtap: connecting to localhost
systemtap: connected!
Trace: currprobe
  CPU  0:                    0 events,       66 KiB data
  CPU  1:                    0 events,        1 KiB data
  Total:                     0 events (dropped 0),       67 KiB data

When the trace is over, you should have a directory on the server like
this:

# cd 127.0.0.1-2006-10-06-22:41:24
# stp_parse

You can then run stp_parse on that system to display the data.

At the moment, I don't have a setup to test this over a real network
and have only tried localhost, but I wouldn't foresee any problems.

Tom




-------------- next part --------------
A non-text attachment was scrubbed...
Name: systemtap-utt.patch.gz
Type: application/octet-stream
Size: 29978 bytes
Desc: systemtap utt patch
URL: <http://sourceware.org/pipermail/systemtap/attachments/20061005/688b054a/attachment.obj>


More information about the Systemtap mailing list