btrace stop device file
btrace reset device
btrace dump file
10 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.
10 stop This command stops tracing on the given device, and dumps the resulting log to the given output file.
10 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.
10 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.
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.
35 btrace start /dev/c2d0 10240 # Start a block trace on c2d0.
35 btrace stop /dev/c2d0 outfile # Stop the block trace on c2d0.
35 btrace dump outfile # View the output of the trace.