4 Written by Jens Axboe <axboe@suse.de> (initial version and kernel support),
5 Alan D. Brunelle (threading and splitup into two seperate programs),
6 Nathan Scott <nathans@sgi.com> (bug fixes, process names, multiple devices)
12 You need to be running a 2.6.13-mm1 kernel with the blk-trace patch
13 included in this repository. If you forgot where you got it, the url is:
15 rsync://rsync.kernel.org/pub/scm/linux/kernel/git/axboe/blktrace.git
17 If you don't have git, you can get hourly snapshots from:
19 http://www.kernel.org/pub/linux/kernel/people/axboe/blktrace/
21 The snapshots include the full git object database as well.
27 % blktrace -d <dev> [-o <output> -a <trace> [-a <trace>] -k]
28 -a <trace> is one of: (use multiple -a options to get more)
39 -k Kill a currently running trace.
40 --- run task to generate load to be traced ---
43 <output>_out.[0..ncpus] : Contains binary trace data
45 % blkparse -i <input> [-o <output> -s -t]
47 <output>.log : Contains formatted trace data, if
48 output logging is added with the -o option. Otherwise, the
49 output is sent to stdout. If the -s option is used, in
50 addition to per-CPU stats, per process stats are shown as well.
51 The -t option will provide individual io statistics, displaying
52 things like completion time, queueing time, etc.
55 If you want to do live tracing, you can pipe the data between blktrace
58 % blktrace -d <device> -o - | blkparse -i -
60 This has a small risk of displaying some traces a little out of sync, since
61 it will do batch sorts of input events. Similarly, you can do traces over
62 the network with eg netcat:
64 % blktrace -d /dev/sda -o - | netcat parsehost portno
65 % netcat -l -p portno tracehost | blkparse -i -
67 Which will send the traces from tracehost to parsehost over the network on
68 the defined port number.
71 20050906, Jens Axboe <axboe@suse.de>