LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

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

Base name for input files (default device.blktrace.cpu); use "-" for live stdin
-o file
Output file (default: stdout)
-D dir
Prepend this directory to the input file names
-d file
Dump a merged binary event stream to file
-f format
Custom output format string for all events
-F typ,format
Output format string for a specific event type
-q
Quiet mode; only print summary at end
-s
Show per-program (per-process) statistics
-t
Track I/O timing; display time deltas per I/O
-w span
Limit output to a time window; end or start:end in nanoseconds
-a mask
Add mask to the current trace action filter
-A hexmask
Set the trace action filter to hexmask
-v
More verbose output

TRACE ACTIONS

Q - Queued: Intent to queue I/O notedI - Inserted: Request sent to I/O schedulerD - Issued: Request sent to driverC - Complete: Request completedM - Back merge: Request merged with existingF - Front merge: Request merged at frontP - Plug: Queue pluggedU - Unplug: Queue unplugged

INSTALL

sudo apt install blktrace
copy
sudo dnf install blktrace
copy
sudo zypper install blktrace
copy
nix profile install nixpkgs#blktrace
copy

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)

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid