slabratetop(8)

πŸ“¦ version 0.36.1, in alpine 3.24, nixpkgs unstable, opensuse-leap 16.0

πŸ’… 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. πŸ’…βœ¨πŸ¦‹