LinuxCommandLibrary

blkparse

Parse and display block I/O trace data

TLDR

Parse and display blktrace output for a device

$ blkparse [sda]
copy
Parse multiple devices
$ blkparse [sda] [sdb]
copy
Parse from stdin (live mode with blktrace)
$ blktrace -d [/dev/sda] -o - | blkparse -i -
copy
Output to a file
$ blkparse [sda] -o [output.txt]
copy
Show specific output fields
$ blkparse -f "%D %a %S %n\n" [sda]
copy
Parse with quiet output (summary only)
$ blkparse -q [sda]
copy

SYNOPSIS

blkparse [options] [device...]

DESCRIPTION

blkparse produces formatted output from event streams recorded by blktrace. It combines event streams from multiple CPUs and devices, converting machine-readable trace data into human-readable format.
The tool is essential for analyzing block I/O patterns, debugging storage performance issues, and understanding how the Linux I/O scheduler processes requests.

PARAMETERS

-i file

Input file (use "-" for stdin)
-o file
Output file (default: stdout)
-d dir
Input directory for trace files
-f format
Custom output format string
-q
Quiet mode; only print summary at end
-s
Show per-program statistics
-t
Track individual I/O completions
-w span
Time span to process (in seconds)
-v
More verbose output

TRACE ACTIONS

Q - Queued: Intent to queue I/O noted
I - Inserted: Request sent to I/O scheduler
D - Issued: Request sent to driver
C - Complete: Request completed
M - Back merge: Request merged with existing
F - Front merge: Request merged at front
P - Plug: Queue plugged
U - Unplug: Queue unplugged

CAVEATS

Requires trace data from blktrace to function. Trace files can become very large for busy systems. Running blktrace requires root privileges. Output can be overwhelming; use format options to limit fields.

HISTORY

blkparse was written by Jens Axboe, Alan D. Brunelle, and Nathan Scott as part of the blktrace toolkit. It was developed to provide detailed I/O tracing capabilities for Linux storage subsystem analysis and debugging.

SEE ALSO

blktrace(8), btrace(8), btt(1), iostat(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community