From Fedora Project Wiki
Description
This test case ensures that blktrace captures and provides detailed traces for block IO actions.
Setup
- Ensure you have a Fedora system.
- Install the
blktracepackage:sudo dnf install blktrace.
How to test
- Open a terminal.
- Start capturing traces for a specific block device, for example, `/dev/sda`: `sudo blktrace -d /dev/sda -o - | blkparse -i -`.
- In a separate terminal or on the system, perform some disk activities like copying files, installing a package, or running a disk benchmarking tool.
- After completing the disk activities, stop
blktraceby pressingCtrl+C. - Review the generated trace output to ensure that block IO events are recorded.
- Filter specific events, like reads (
R) or writes (W), from the trace to check their details:blkparse -i /dev/sda -a R,W.
Expected Results
blktraceshould start capturing traces without any errors.- The trace output should record detailed block IO events corresponding to the disk activities performed.
- Filters applied through
blkparseshould accurately narrow down the trace output to specific events.
Optional
For deeper testing:
- Examine the output for specific flags like queued (
Q), issued (D), completed (C), etc. - Test
blktraceon various disk types, including HDDs, SSDs, and NVMe drives. - Check the behavior of
blktracewith high IO workloads. - Use tools like
btt(part of theblktracesuite) to analyze and generate statistics from the trace data. - Ensure proper functioning with different file systems (ext4, xfs, btrfs, etc.).
