runqlen(8)
π runqlen(8) π
System Manager's Manual π
β¨ NAME β¨
runqlen β scheduler run queue length as a histogram π
π SYNOPSIS π
runqlen [-h] [-T] [-O] [-C] [interval] [count]
πΈ DESCRIPTION πΈ
okay so this program summarizes scheduler queue length as a histogram π, and it can also show run queue occupancy too π₯. it works by sampling the run queue length on all CPUs at 99 Hertz β±οΈ, so it's literally sampling constantly like a paparazzi πΈ
this tool is perfect for spotting imbalances π, like when processes are bound to CPUs and causing queueing, or when interrupt mappings are causing the same mess π
β οΈ since this uses BPF, only the root user can use this tool. no sneaking in as a regular user, bestie π«
π§ REQUIREMENTS π§
you'll need CONFIG_BPF and bcc β¨
π OPTIONS π
-hβ prints the usage message π-Tβ adds timestamps to the output β°-Oβ reports run queue occupancy π¦-Cβ reports for each CPU separately π₯οΈintervalβ the output interval, in seconds β³countβ how many outputs you want π’
π EXAMPLES π
summarize run queue length as a histogram:
# runqlen
print 1 second summaries, 10 times:
# runqlen 1 10
print output every second, with timestamps, and show each CPU separately:
# runqlen -CT 1
print run queue occupancy every second:
# runqlen -O 1
print run queue occupancy, with timestamps, for each CPU:
# runqlen -COT 1
π¦ FIELDS π¦
runqlenβ the scheduler run queue length: the number of threads (tasks) waiting to run, (excluding including the currently running task) π§΅countβ the number of samples at this queue length π’distributionβ an ASCII bar chart visualizing the distribution (count column) π
π OVERHEAD π
this uses sampling at 99 Hertz (on all CPUs) plus in-kernel summaries, so the overhead should be basically negligible π«Ά. it does not trace scheduler events the way runqlat does, and tracing is where the much higher overhead cost comes from π
π§ SOURCE π§
this is from bcc π
https://github.com/iovisor/bcc
also check out the bcc distribution for a companion _examples.txt file with example usage, output, and commentary for this tool π
π₯οΈ OS π₯οΈ
Linux π§
π§ STABILITY π§
π§ Unstable β still in development, so expect some drama π
π AUTHOR π
Brendan Gregg, the legend himself π₯
π SEE ALSO π
runqlat(8), runqslower(8), pidstat(1) π
that's the tea, bestie ββ¨ runqlen(8) from the USER COMMANDS section, last updated 2016-12-12 π§π
π¦ where this page comes from
- alpine 3.24: bcc-doc 0.36.1-r1 Β· Apache-2.0
- nixpkgs unstable: bcc 0.37.0
- opensuse-leap 16.0: bcc-tools 0.35.0-160000.2.2 Β· Apache-2.0
- opensuse-leap 16.0: bcc-tools 0.35.0-160000.2.2 Β· Apache-2.0
- opensuse-leap 16.0: bcc-tools 0.35.0-160000.2.2 Β· Apache-2.0
- opensuse-leap 16.0: bcc-tools 0.35.0-160000.2.2 Β· Apache-2.0
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms