Linux command
btt 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Analyze block trace
btt -i [sda.blktrace.0]
Analyze with specific output prefix
btt -i [device.blktrace.0] -o [analysis]
Generate Q2C latency data
btt -i [trace.blktrace.0] -q [q2c_output]
Generate D2C latency data
btt -i [trace.blktrace.0] -d [d2c_output]
Analyze merged trace files
blkparse -i [sda] -d [merged.bin] && btt -i [merged.bin]
Verbose analysis
btt -i [trace.blktrace.0] -v
说明
btt (Block Trace Timeline) analyzes block layer trace data generated by blktrace. It produces statistical reports showing I/O latency distributions, throughput, and timing breakdowns across the block I/O stack. The analysis breaks down request processing into stages: Q (queued), G (get request), I (inserted), M (merged), D (dispatched), C (completed). btt reports latencies between these stages to identify bottlenecks. Output includes overall statistics, per-device breakdowns, and optional detailed timing files for each stage transition. This data is valuable for understanding storage performance characteristics and diagnosing latency issues.
参数
- -i _file_
- Input trace file (from blkparse -d).
- -o _prefix_
- Output file prefix.
- -q _file_
- Write Q2C latency data.
- -d _file_
- Write D2C latency data.
- -l _file_
- Write per-IO latency data.
- -m _file_
- Write D2D seek distance data.
- -B _file_
- Write block number data.
- -v
- Verbose output.
- -V
- Version information.
- -a
- Include all accounting.
- -M
- Only display device mapping info.
FAQ
What is the btt command used for?
btt (Block Trace Timeline) analyzes block layer trace data generated by blktrace. It produces statistical reports showing I/O latency distributions, throughput, and timing breakdowns across the block I/O stack. The analysis breaks down request processing into stages: Q (queued), G (get request), I (inserted), M (merged), D (dispatched), C (completed). btt reports latencies between these stages to identify bottlenecks. Output includes overall statistics, per-device breakdowns, and optional detailed timing files for each stage transition. This data is valuable for understanding storage performance characteristics and diagnosing latency issues.
How do I run a basic btt example?
Run `btt -i [sda.blktrace.0]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -i _file_ do in btt?
Input trace file (from blkparse -d).