BTRACE(8)BTRACE(8)NAMEbtrace - block-level tracing interface
SYNOPSISbtrace start device entries
btrace stop device file
btrace reset device
btrace dump file
DESCRIPTION
The btrace tool is the user interface to MINIX3's block-level tracing
facility. It allows one to start, stop, and reset tracing, and dump a
trace output file in a somewhat human-readable format.
COMMANDS
start This command starts tracing all block requests on the given
device. Each block request takes up one entry in the log. The
entries parameter specifies the allocation side of the log in
the driver process, in number of (32-byte) entries. Once the
log is full, no more entries will be added.
stop This command stops tracing on the given device, and dumps the
resulting log to the given output file.
reset This command stops tracing on the given device and resets the
state of the block tracer. This should be useful only in
emergency situations.
dump Dump the contents of a log file generated earlier with btrace
stop, in human-readable format. Heavy users of the block
tracing facility will probably want to write their own tools
for parsing and visualizing dump files.
LIMITATIONS
Only one block device can be traced per driver at once. It is therefore
also not possible to trace a device and all its partitions at the same
time. The tracing facility has been designed for tracing activity of a
single file system, in which case these limitations are not important.
The log will always start with a close operation on the device, since
btrace closes the file descriptor used to instruct the driver to start
tracing. Similarly, for logs that have not already filled up during
tracing, the last entry will be a btrace-triggered open operation.
EXAMPLESbtrace start /dev/c2d0 10240 # Start a block trace on c2d0.
btrace stop /dev/c2d0 outfile # Stop the block trace on c2d0.
btrace dump outfile # View the output of the trace.
SEE ALSOioctl(2).
AUTHOR
David van Moolenbroek <david@minix3.org>
BTRACE(8)