ext4dist-bpfcc: Summarize ext4 operation latency
ext4dist-bpfcc [-h] [-T] [-m] [-p PID] [interval] [count]
What it does
Summarize ext4 operation latency. Part of the bcc tools (bpfcc-tools 0.35.0 on Ubuntu, installed as /usr/sbin/ext4dist-bpfcc; upstream and other distributions call it ext4dist). It loads an eBPF program, so it needs root.
Options you will use
interval- output interval, in seconds
count- number of outputs
-T, --notimestamp- don't include timestamp on interval output
-m, --milliseconds- output in milliseconds
-p, --pid PID- trace this PID only
Examples
$ sudo ext4dist-bpfccshow operation latency as a histogram
$ sudo ext4dist-bpfcc -p 181trace PID 181 only
$ sudo ext4dist-bpfcc 1 10print 1 second summaries, 10 times
$ sudo ext4dist-bpfcc -m 55s summaries, milliseconds
Gotchas
- Latency histograms per ext4 operation (read, write, open, fsync).
- As a normal user it fails with "could not open bpf map: ..., error: Operation not permitted" (unprivileged BPF is off on Ubuntu).
Try ext4dist-bpfcc in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.