Block IO Tracing ---------------- Written by Jens Axboe (initial version and kernel support), Alan D. Brunelle (threading and splitup into two seperate programs), Nathan Scott (bug fixes, process names, multiple devices) Requirements ------------ You need to be running a 2.6.14-rc1 kernel or newer, with the blk-trace patch included in this repository. If you forgot where you got it, the url is: rsync://rsync.kernel.org/pub/scm/linux/kernel/git/axboe/blktrace.git If you don't have git, you can get hourly snapshots from: http://www.kernel.org/pub/linux/kernel/people/axboe/blktrace/ The snapshots include the full git object database as well. Usage ----- % blktrace -d [-o -a [-a ] -k] -a is one of: (use multiple -a options to get more) READ WRITE BARRIER SYNC QUEUE REQUEUE ISSUE COMPLETE FS PC -k Kill a currently running trace. --- run task to generate load to be traced --- --- Generates: _out.[0..ncpus] : Contains binary trace data % blkparse -i [-o -s -t] --- Generates: .log : Contains formatted trace data, if output logging is added with the -o option. Otherwise, the output is sent to stdout. If the -s option is used, in addition to per-CPU stats, per process stats are shown as well. The -t option will provide individual io statistics, displaying things like completion time, queueing time, etc. If you want to do live tracing, you can pipe the data between blktrace and blkparse: % blktrace -d -o - | blkparse -i - This has a small risk of displaying some traces a little out of sync, since it will do batch sorts of input events. Similarly, you can do traces over the network with eg netcat: % blktrace -d /dev/sda -o - | netcat parsehost portno % netcat -l -p portno tracehost | blkparse -i - Which will send the traces from tracehost to parsehost over the network on the defined port number. 20050906, Jens Axboe