2 - blktrace receives data from the kernel in buffers passed up through the debug file system (relay). Each device being traced has a file created in the mounted directory for the debugfs, which defaults to /sys/kernel/debug -- this can be overridden with the -r command line argument.
2 - blktrace defaults to collecting all events that can be traced. To limit the events being captured, you can specify one or more filter masks via the -a option. Alternatively, one may specify the entire mask utilising a hexadecimal value that is version-specific. (Requires understanding of the internal representation of the filter mask.)
2 - As noted above, the events are passed up via a series of buffers stored into debugfs files. The size and number of buffers can be specified via the -b and -n arguments respectively.
2 - blktrace stores the extracted data into files stored in the local directory. The format of the file names is (by default) device.blktrace.cpu, where device is the base device name (e.g, if we are tracing /dev/sda, the base device name would be sda); and cpu identifies a CPU for the event stream. The device portion of the event file name can be changed via the -o option.
2 - blktrace may also be run concurrently with blkparse to produce live output -- to do this specify -o - for blktrace.
2 - The default behaviour for blktrace is to run forever until explicitly killed by the user (via a control-C, or sending SIGINT signal to the process via invocation the kill (1) utility). Also you can specify a run-time duration for blktrace via the -w option -- then blktrace will run for the specified number of seconds, and then halt.
--set-mask=hex-mask
Set filter mask to hex-mask (see below for masks)
--act-mask=mask
Add mask to current filter (see below for masks)
--buffer-size=size
Specifies buffer size for event extraction (scaled by 1024). The default buffer size is 512KiB.
--dev=dev
Adds dev as a device to trace
--input-devs=file
Adds the devices found in file as devices to trace
--num-sub-buffers=num-sub
Specifies number of buffers to use. blktrace defaults to 4 sub buffers.
--listen
Run in network listen mode (blktrace server)
--host=hostname
Run in network client mode, connecting to the given host
--port=number
Network port to use (default 8462)
--no-sendfile
Make the network client NOT use sendfile() to transfer data
--output=basename
Specifies base name for input files. Default is device.blktrace.cpu. Specifying -o - runs in live mode with blkparse (writing data to standard out).
--output-dir=dir
Prepend file to output file name(s) This only works when supplying a single device, or when piping the output via "-o -" with multiple devices.
--relay=rel-path
Specifies debugfs mount point
--version
Outputs version
--version
Outputs version
--stopwatch=seconds
Sets run time to the number of seconds specified
barrier: barrier attribute
complete: completed by driver
discard: discard / trim traces
fs: requests
issue: issued to driver
pc: packet command events
queue: queue operations
read: read traces
requeue: requeue operations
sync: synchronous attribute
write: write traces
notify: trace messages
drv_data: additional driver specific trace
This is free software. You may redistribute copies of it under the terms of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the extent permitted by law.
This manual page was created for Debian by Bas Zoetekouw. It was derived from the documentation provided by the authors and it may be used, distributed and modified under the terms of the GNU General Public License, version 2.
On Debian systems, the text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2.