2 - By default, blkparse expects to run in a post-processing mode; one where the trace events have been saved by a previous run of blktrace, and blkparse is combining event streams and dumping formatted data. blkparse may be run in a live manner concurrently with blktrace by specifying -i - to blkparse, and combining it with the live option for blktrace. An example would be: % blktrace -d /dev/sda -o - | blkparse -i -
2 - You can set how many blkparse batches event reads via the -b option, the default is to handle events in batches of 512.
2 - If you have saved event traces in blktrace with different output names (via the -o option to blktrace), you must specify the same input name via the -i option.
2 - The format of the output data can be controlled via the -f or -F options -- see OUTPUT DESCRIPTION AND FORMATTING for details.
By default, blkparse sends formatted data to standard output. This may be changed via the -o option, or text output can be disabled via the -O option. A merged binary stream can be produced using the -d option.
--batch={batch}
Standard input read batching
--input=file
Specifies base name for input files -- default is device.blktrace.cpu. As noted above, specifying -i - runs in live mode with blktrace (reading data from standard in).
--format=typ,fmt
-f fmt
--format-spec=fmt
Sets output format (See OUTPUT DESCRIPTION AND FORMATTING for details.) The -f form specifies a format for all events The -F form allows one to specify a format for a specific event type. The single-character typ field is one of the action specifiers described in ACTION IDENTIFIERS.
--no-msgs
When -d is specified, this will stop messages from being output to the file. (Can seriously reduce the size of the resultant file when using the CFQ I/O scheduler.)
--hash-by-name
Hash processes by name, not by PID
--output=file
Output file
--no-text-output
Do not produce text output, used for binary (-d) only
--dump-binary=file
Binary output file
--quiet
Quiet mode
--per-program-stats
Displays data sorted by program
--track-ios
Display time deltas per IO
--stopwatch=span
Display traces for the span specified -- where span can be:
end-time -- Display traces from time 0 through end-time (in ns)
or
start:end-time -- Display traces from time start through end-time (in ns).
--verbose
More verbose marginal on marginal errors
--version
Display version
4 C -- complete A previously issued request has been completed. The output will detail the sector and size of that request, as well as the success or failure of it.
4 D -- issued A request that previously resided on the block layer queue or in the i/o scheduler has been sent to the driver.
4 I -- inserted A request is being sent to the i/o scheduler for addition to the internal queue and later service by the driver. The request is fully formed at this time.
4 Q -- queued This notes intent to queue i/o at the given location. No real requests exists yet.
4 B -- bounced The data pages attached to this bio are not reachable by the hardware and must be bounced to a lower memory location. This causes a big slowdown in i/o performance, since the data must be copied to/from kernel buffers. Usually this can be fixed with using better hardware -- either a better i/o controller, or a platform with an IOMMU.
4 M -- back merge A previously inserted request exists that ends on the boundary of where this i/o begins, so the i/o scheduler can merge them together.
4 F -- front merge Same as the back merge, except this i/o ends where a previously inserted requests starts.
4 M --front or back merge One of the above
4 M -- front or back merge One of the above.
4 G -- get request To send any type of request to a block device, a struct request container must be allocated first.
4 S -- sleep No available request structures were available, so the issuer has to wait for one to be freed.
4 P -- plug When i/o is queued to a previously empty block device queue, Linux will plug the queue in anticipation of future ios being added before this data is needed.
4 U -- unplug Some request data already queued in the device, start sending requests to the driver. This may happen automatically if a timeout period has passed (see next entry) or if a number of requests have been added to the queue.
4 T -- unplug due to timer If nobody requests the i/o that was queued after plugging the queue, Linux will automatically unplug it after a defined period has passed.
4 X -- split On raid or device mapper setups, an incoming i/o may straddle a device or internal zone and needs to be chopped up into smaller pieces for service. This may indicate a performance problem due to a bad setup of that raid/dm device, but may also just be part of normal boundary conditions. dm is notably bad at this and will clone lots of i/o.
4 A -- remap For stacked devices, incoming i/o is remapped to device below it in the i/o stack. The remap action details what exactly is being remapped to what.
Note that the user can optionally specify field display width, and optionally a left-aligned specifier. These precede field specifiers, with a '%' character, followed by the optional left-alignment specifier (-) followed by the width (a decimal number) and then the field. Thus, to specify the command in a 12-character field that is left aligned: -f "%-12C"
If a payload is present, this is presented between parenthesis following the header, followed by the error value. If no payload is present, the sector and number of blocks are presented (with an intervening plus (+) character). If the -t option was specified, then the elapsed time is presented. In either case, it is followed by the error value for the completion.
D -- issued
I -- inserted
Q -- queued
If a payload is present, the number of payload bytes is output, followed by the payload in hexadecimal between parenthesis. If no payload is present, the sector and number of blocks are presented (with an intervening plus (+) character). If the -t option was specified, then the elapsed time is presented (in parenthesis). In either case, it is followed by the command associated with the event (surrounded by square brackets).
G -- get request
M -- back merge
S -- sleep
The starting sector and number of blocks is output (with an intervening plus (+) character), followed by the command associated with the event (surrounded by square brackets).
The command associated with the event (surrounded by square brackets) is output.
T -- unplug due to timer
The command associated with the event (surrounded by square brackets) is output, followed by the number of requests outstanding.
The original starting sector followed by the new sector (separated by a slash (/) is output, followed by the command associated with the event (surrounded by square brackets).
Sector and length is output, along with the original device and sector offset.