runqlen.bt(8)
π NAME π
runqlen.bt is the tool for seeing CPU scheduler run queue length as a histogram, and it runs on bpftrace/eBPF π₯ β¨
π SYNOPSIS π
runqlen.bt
πΈ DESCRIPTION πΈ
okay so this program summarizes scheduler queue length as a histogram, and it can also show you run queue occupancy π It works by sampling the run queue length on all CPUs at 99 Hertz π
this is lowkey perfect for spotting imbalances π like when processes are bound to CPUs and cause queueing, or when interrupt mappings cause the same mess π
bestie, since this uses BPF, only the root user can use this tool. no cap π
π¦ REQUIREMENTS π¦
you'll need CONFIG_BPF and bpftrace β¨
π EXAMPLES π
Trace CPU run queue length system wide, and print a histogram when you hit Ctrl-C π
# runqlen.bt
π§ FIELDS π§
- 1st, 2nd β the run queue length shows up in the first field, right after the
[π«Ά - 3rd β a column with the count of samples for that length π’
- 4th β an ASCII histogram that draws out the count column π
π OVERHEAD π
this samples scheduler structs at 99 Hertz across all CPUs. compared to other stuff, that's a low rate of events, so the overhead of this tool is expected to be near zero π β¨
π₯ SOURCE π₯
this one comes straight from bpftrace π
https://github.com/bpftrace/bpftrace
also check out the bpftrace distribution for a companion _examples.txt file. it has example usage, output, and commentary for this tool π
this is the bpftrace version of the bcc tool with the same name β¨ the bcc tool may give you more options and customizations, so go peek at it too π
https://github.com/iovisor/bcc
π· OS π·
Linux π§
π«§ STABILITY π«§
Unstable, since it's still in development π expect things to shift around a bit π
π AUTHOR π
Brendan Gregg π«Ά
π¦’ SEE ALSO π¦’
runqlat.bt(8), mpstat(1), pidstat(1), uptime(1) π
ok that's the whole tea, bestie π this is the bpftrace-style runqlen.bt(8) page from the USER COMMANDS section, dated 2018-10-07. ily, go trace some run queues π«Άπβ¨
π¦ where this page comes from
- alpine 3.24: bpftrace-tools-doc 0.26.1-r0 Β· Apache-2.0
- arch rolling: bpftrace 0.27.0-2 Β· Apache-2.0
- centos-stream 10: bpftrace 0.26.1-1.el10 Β· Apache-2.0
- centos-stream 9: bpftrace 0.26.1-1.el9 Β· ASL 2.0
- debian trixie: bpftrace 0.23.2-1 Β· Apache-2.0
- fedora 43: bpftrace 0.24.0-1.fc43 Β· Apache-2.0
- fedora 43: bpftrace 0.24.2-1.fc43 Β· Apache-2.0
- fedora 44: bpftrace 0.24.2-3.fc44 Β· Apache-2.0
- nixos 26.05: bpftrace 0.25.1
- nixpkgs unstable: bpftrace 0.27.1
- opensuse-leap 16.0: bpftrace-tools 0.23.5-160000.1.2 Β· Apache-2.0
- ubuntu questing: bpftrace 0.23.5-1ubuntu1 Β· Apache-2.0
- ubuntu resolute: bpftrace 0.25.0-1ubuntu1 Β· Apache-2.0
- ubuntu stonking: bpftrace 0.25.0-1ubuntu2 Β· Apache-2.0
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms