OnCallReadyStart learning

ext4slower-bpfcc: Trace common ext4 file operations slower than a threshold

ext4slower-bpfcc [-h] [-j] [-p PID] [min_ms]

What it does

Trace common ext4 file operations slower than a threshold. Part of the bcc tools (bpfcc-tools 0.35.0 on Ubuntu, installed as /usr/sbin/ext4slower-bpfcc; upstream and other distributions call it ext4slower). It loads an eBPF program, so it needs root.

Options you will use

min_ms
minimum I/O duration to trace, in ms (default 10)
-j, --csv
just print fields: comma-separated values
-p, --pid PID
trace this PID only

Examples

$ sudo ext4slower-bpfcc

trace operations slower than 10 ms (default)

$ sudo ext4slower-bpfcc 1

trace operations slower than 1 ms

$ sudo ext4slower-bpfcc -j 1

... 1 ms, parsable output (csv)

$ sudo ext4slower-bpfcc 0

trace all operations (warning: verbose)

$ sudo ext4slower-bpfcc -p 185

trace PID 185 only

Gotchas

Try ext4slower-bpfcc in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.