cpuwalk.bt(8)
π cpuwalk.bt β the tea β
okay bestie, gather round, because we're talking about cpuwalk.bt from the System Manager's Manual (section 8, we love a system manager moment) β¨
πΈ NAME πΈ
cpuwalk.bt β literally samples which CPUs are executing processes. yeah. that's the whole vibe. and it uses bpftrace/eBPF to do it π¦
π SYNOPSIS π
cpuwalk.bt
that's it. that's the whole thing. no args, no flags, just vibes π
β¨ DESCRIPTION β¨
so here's what's happening: this tool samples your CPUs at 99 Hertz, and then prints a histogram showing which CPUs were actually active π₯
and why 99 Hertz specifically, you ask? because 99 Hertz is used to avoid lockstep sampling β which would skew your results. like, we do NOT do skewed results in this house π ββοΈ no cap.
this tool can help you figure out if your application's workload is evenly using the CPUs, or if there's an imbalance problem going on. it's giving detective energy π
β οΈ okay important: since this uses BPF, only the root user can use this tool. root only. periodt. π
π§ REQUIREMENTS π§
CONFIG_BPFbpftrace
both. you need both. that's the entry fee bestie ποΈ
π EXAMPLES π
sample CPUs and print a summary on Ctrl-C:
# cpuwalk.bt
so you run it, you watch it do its lil thing, and then you hit Ctrl-C and it gives you the summary. iconic behavior honestly π
π FIELDS π
- 1st, 2nd β the CPU is shown in the first field, right after the
"[". as for the second field? disregard it. we don't know her. ignore her. π - 3rd β a column showing the number of samples for this CPU π
- 4th β this is an ASCII histogram representing the count column β¨
π«Ά OVERHEAD π«Ά
this should be negligible. tiny. basically free. we love a low-cost queen π
π SOURCE π
this is from bpftrace π
https://github.com/iovisor/bpftrace
also, look in the bpftrace distribution for a companion _examples.txt file containing example usage, output, and commentary for this tool. it's like the director's commentary track but for your tool π¬
π¦ OS π¦
Linux π§
π STABILITY π
Unstable β in development. she's still growing. still evolving. still in her development era π±
π AUTHOR π
Brendan Gregg π
β SEE ALSO β
okay and one last thing before you go, bestie β this little love letter came from USER COMMANDS, dated 2018-09-08, and it lives at cpuwalk.bt(8). write that down. or don't. it's on the page either way π
β¨π
π¦ where this page comes from
- debian bookworm: bpftrace 0.17.0-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms