slabtop(1)
Display kernel slab cache statistics in real-time, showing memory usage of kernel objects.
Synopsis
slabtop [OPTION]...Description
slabtop displays real-time information about kernel slab caches, showing how much memory is consumed by different kernel data structures. It reads from /proc/slabinfo and updates dynamically, similar to top(1) but for kernel memory allocations.
Kernel objects like inodes, dentries, and network buffers are allocated from slab caches. slabtop helps identify memory leaks and understand kernel memory usage patterns.
Common options
| Flag | What it does |
|---|---|
-d DELAY | Refresh interval in seconds (default: 3) |
-s SORT | Sort by: a(active), b(bytes), c(cache), l(loss), o(objects), p(pages), s(slabs), u(use) (default: c) |
-o | One-shot mode: print output once and exit, do not update |
-n NUM | Show NUM slab caches (default: 10) |
-S SORT | Sort in descending order by specified metric |
--sort=SORT | Long option form for sorting criteria |
--delay=DELAY | Long option form for refresh interval |
-h, --help | Display help message and exit |
Examples
Show top 10 slab caches sorted by cache size, updating every 3 seconds
slabtopPrint slab statistics once and exit (useful in scripts)
slabtop -oShow top 20 slab caches sorted by bytes used in descending order
slabtop -s b -n 20Refresh every 1 second, sorting by number of active objects
slabtop -d 1 -s oDisplay 5 caches with highest usage percentage
slabtop -s u -n 5One-shot output of top 20 slab caches by memory consumption
slabtop -o -s b | head -20