DOKK / manpages / debian 10 / bpfcc-tools / slabratetop-bpfcc.8.en
slabratetop(8) System Manager's Manual slabratetop(8)

slabratetop - Kernel SLAB/SLUB memory cache allocation rate top. Uses Linux BPF/bcc.

slabratetop [-h] [-C] [-r MAXROWS] [interval] [count]

This is top for the the rate of kernel SLAB/SLUB memory allocations. It works by tracing kmem_cache_alloc() calls, a commonly used interface for kernel memory allocation (SLAB or SLUB). It summarizes the rate and total bytes allocated of these calls per interval: the activity. Compare this to slabtop(1), which shows the current static volume of the caches.

This tool uses kernel dynamic tracing of the kmem_cache_alloc() function.

Since this uses BPF, only the root user can use this tool.

CONFIG_BPF and bcc.

Don't clear the screen.
Maximum number of rows to print. Default is 20.
Interval between updates, seconds.
Number of interval summaries.

# slabratetop
# slabratetop -Cr 8
5 second summaries, 10 times only:
# slabratetop 5 10

The contents of /proc/loadavg
Kernel cache name.
Allocations (number of calls).
Total bytes allocated.

If kmem_cache_alloc() is called at a high rate (eg, >100k/second) the overhead of this tool might begin to be measurable. The rate can be seen in the ALLOCS column of the output.

This is from bcc.

https://github.com/iovisor/bcc

Also look in the bcc distribution for a companion _examples.txt file containing example usage, output, and commentary for this tool.

Linux

Unstable - in development.

Brendan Gregg

slabtop(1)

2016-10-17 USER COMMANDS