cpuwalk.bt(8)
๐ NAME ๐
okay so this manual is for cpuwalk.bt(8), from the System Manager's Manual ๐
It's the bestie that tells you which CPUs are actually running processes. cpuwalk.bt is a bpftrace/eBPF tool that samples the sample which CPUs are executing processes.. ๐ง
โจ SYNOPSIS โจ
cpuwalk.bt
๐ DESCRIPTION ๐
okay so this tool samples your CPUs at 99 Hertz ๐ฅ and then prints a histogram showing which CPUs were active. Why 99 and not a nice round 100? Because 99 Hertz avoids lockstep sampling, which would skew your results. It's giving accuracy ๐ญ
This is the vibe check for your app: it can help you figure out if your workload is evenly spreading across the CPUs, or if there's an imbalance problem ๐
Since this uses BPF, only the root user can use this tool. No cap, you need to be root ๐
๐ฆ REQUIREMENTS ๐ฆ
You'll need CONFIG_BPF and bpftrace. Those are the non-negotiables, bestie โจ
๐ธ EXAMPLES ๐ธ
Sample the CPUs and get a summary when you hit Ctrl-C ๐
# cpuwalk.bt
๐ FIELDS ๐
- 1st, 2nd โ The CPU shows up in the first field, right after the
[. Ignore the second field, it's not the main character here ๐ - 3rd โ A column with the number of samples for that CPU ๐ข
- 4th โ An ASCII histogram that visualizes the count column. Cute bar chart energy ๐
๐ OVERHEAD ๐
This should be negligible ๐ซถ Basically no drama on your system.
๐ SOURCE ๐
This one is from bpftrace, obviously ๐ง
https://github.com/bpftrace/bpftrace
Also, go look in the bpftrace distribution for a companion _examples.txt file. It has example usage, output, and commentary for this tool, so it's lowkey the best study guide ๐โจ
๐ฆ OS ๐ฆ
Linux ๐ง only, babe.
๐งช STABILITY ๐งช
Unstable - in development. So it's still cooking, don't be shocked if things shift ๐
๐ AUTHOR ๐
Brendan Gregg ๐ the legend himself.
๐ฎ SEE ALSO ๐ฎ
mpstat(1) is your bestie for this one ๐
Sign-off: this page was from USER COMMANDS, dated 2018-09-08, and it's cpuwalk.bt(8) ๐๐ ily, go sample those CPUs โจ
๐ฆ 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