From Fedora Project Wiki
(Created page with "{{QA/Test_Case |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 `blktrace` package: `sudo dnf install blktrace`. |actions= # 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...") |
No edit summary |
||
Line 6: | Line 6: | ||
|actions= | |actions= | ||
# Open a terminal. | # Open a terminal. | ||
# Start capturing traces for a specific block device, for example, `/dev/sda`: `sudo blktrace -d /dev/sda -o - | blkparse -i -`. | # Start capturing traces for a specific block device, for example, <nowiki>`/dev/sda`: `sudo blktrace -d /dev/sda -o - | blkparse -i -`. </nowiki> | ||
# In a separate terminal or on the system, perform some disk activities like copying files, installing a package, or running a disk benchmarking tool. | # 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 `blktrace` by pressing `Ctrl+C`. | # After completing the disk activities, stop `blktrace` by pressing `Ctrl+C`. |
Latest revision as of 19:35, 12 August 2023
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
blktrace
package: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
blktrace
by 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
blktrace
should start capturing traces without any errors.- The trace output should record detailed block IO events corresponding to the disk activities performed.
- Filters applied through
blkparse
should 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
blktrace
on various disk types, including HDDs, SSDs, and NVMe drives. - Check the behavior of
blktrace
with high IO workloads. - Use tools like
btt
(part of theblktrace
suite) to analyze and generate statistics from the trace data. - Ensure proper functioning with different file systems (ext4, xfs, btrfs, etc.).