runqlen-bpfcc: Summarize scheduler run queue length as a histogram
runqlen-bpfcc [-h] [-T] [-O] [-C] [interval] [count]
What it does
Summarize scheduler run queue length as a histogram. Part of the bcc tools (bpfcc-tools 0.35.0 on Ubuntu, installed as /usr/sbin/runqlen-bpfcc; upstream and other distributions call it runqlen). It loads an eBPF program, so it needs root.
Options you will use
interval- output interval, in seconds
count- number of outputs
-T, --timestamp- include timestamp on output
-O, --runqocc- report run queue occupancy
-C, --cpus- print output for each CPU separately
Examples
$ sudo runqlen-bpfccsummarize run queue length as a histogram
$ sudo runqlen-bpfcc 1 10print 1 second summaries, 10 times
$ sudo runqlen-bpfcc -T 11s summaries and timestamps
$ sudo runqlen-bpfcc -Oreport run queue occupancy
$ sudo runqlen-bpfcc -Cshow each CPU separately
Gotchas
- Samples the run queue length per CPU at 99 Hz.
- As a normal user it fails with "could not open bpf map: ..., error: Operation not permitted" (unprivileged BPF is off on Ubuntu).
Try runqlen-bpfcc in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.