DOKK / manpages / debian 12 / bpfcc-tools / runqlen-bpfcc.8.en
runqlen(8) System Manager's Manual runqlen(8)

runqlen - Scheduler run queue length as a histogram.

runqlen [-h] [-T] [-O] [-C] [interval] [count]

This program summarizes scheduler queue length as a histogram, and can also show run queue occupancy. It works by sampling the run queue length on all CPUs at 99 Hertz.

This tool can be used to identify imbalances, eg, when processes are bound to CPUs causing queueing, or interrupt mappings causing the same.

Since this uses BPF, only the root user can use this tool.

CONFIG_BPF and bcc.

Print usage message.
Include timestamps on output.
Report run queue occupancy.
Report for each CPU.
Output interval, in seconds.
Number of outputs.

# runqlen
# runqlen 1 10
# runqlen -CT 1
# runqlen -O 1
# runqlen -COT 1

Scheduler run queue length: the number of threads (tasks) waiting to run, (excluding including the currently running task).
Number of samples at this queue length.
An ASCII bar chart to visualize the distribution (count column)

This uses sampling at 99 Hertz (on all CPUs), and in-kernel summaries, which should make overhead negligible. This does not trace scheduler events, like runqlen does, which comes at a much higher overhead cost.

This is from bcc.

https://github.com/iovisor/bcc

Also look in the bcc distribution for a companion _examples.txt file containing example usage, output, and commentary for this tool.

Linux

Unstable - in development.

Brendan Gregg

runqlat(8), runqslower(8), pidstat(1)

2016-12-12 USER COMMANDS