slabratetop(8)
π slabratetop(8) π
Okay so this is the manual for slabratetop, the Linux tool for watching the kernel's SLAB/SLUB memory allocation rate. It's from the System Manager's Manual, and it's the lowkey iconic sibling of slabtop. π¦
β¨ NAME β¨
slabratetop is a kernel SLAB/SLUB memory cache allocation rate top tool. It uses Linux BPF/bcc. π§
β¨ SYNOPSIS β¨
slabratetop [-h] [-C] [-r MAXROWS] [interval] [count]
β¨ DESCRIPTION β¨
Bestie, this is top but for the rate of kernel SLAB/SLUB memory allocations. π It works by tracing kmem_cache_alloc() calls, which is a super common interface for kernel memory allocation (SLAB or SLUB). It summarizes the rate and total bytes allocated by these calls per interval, so you can see the activity. π₯
If you want the current static volume of the caches instead, check out slabtop(1). That one shows what's sitting there, while this one shows what's happening. π
This tool uses kernel dynamic tracing of the kmem_cache_alloc() function. πΈ
Since this uses BPF, only the root user can use this tool. π No root, no slabratetop, sorry bestie π
β¨ REQUIREMENTS β¨
You need CONFIG_BPF and bcc. π«Ά
β¨ OPTIONS β¨
-Cβ Don't clear the screen. π-r MAXROWSβ Sets the maximum number of rows to print. The default is 20. π- interval β The gap between updates, in seconds. β
- count β How many interval summaries you want. π
β¨ EXAMPLES β¨
Summarize active kernel SLAB/SLUB calls (kmem_cache_alloc()), showing the top 20 caches every second. This is the main character default: π
# slabratetop
Don't clear the screen, and only show the top 8 rows. Clean and aesthetic. π
# slabratetop -Cr 8
5 second summaries, 10 times only. Very structured, very organized. π§
# slabratetop 5 10
β¨ FIELDS β¨
loadavgβ The contents of/proc/loadavg. πΈCACHEβ The kernel cache name. πALLOCSβ The number of allocations (number of calls). β¨BYTESβ The total bytes allocated. π₯
β¨ OVERHEAD β¨
Heads up, bestie. If kmem_cache_alloc() is called at a high rate (eg, >100k/second), the overhead of this tool might start to be measurable. π You can see the rate in the ALLOCS column of the output. π¦
β¨ SOURCE β¨
This is from bcc. π«Ά The repo lives at https://github.com/iovisor/bcc.
Also look in the bcc distribution for a companion _examples.txt file. It has example usage, output, and commentary for this tool, and it's giving very helpful energy. π
β¨ OS β¨
Linux π§
β¨ STABILITY β¨
Unstable, still in development. π Handle with care, it's a work in progress.
β¨ AUTHOR β¨
Brendan Gregg π
β¨ SEE ALSO β¨
slabtop(1) π
Okay that's the whole tea, bestie. This page came from the USER COMMANDS section, dated 2016-10-17, and it's all about slabratetop(8). Slay forever. π β¨π¦
π¦ 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