slabratetop(8) System Manager's Manual slabratetop(8)

# [NAME](#NAME)

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

# [SYNOPSIS](#SYNOPSIS)

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

# [DESCRIPTION](#DESCRIPTION)

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)](/man/enterprise-packages/bcc/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.

# [REQUIREMENTS](#REQUIREMENTS)

CONFIG\_BPF and bcc.

# [OPTIONS](#OPTIONS)

[-C](#C)

Don't clear the screen.

[-r MAXROWS](#r)

Maximum number of rows to print. Default is 20.

[interval](#interval)

Interval between updates, seconds.

[count](#count)

Number of interval summaries.

# [EXAMPLES](#EXAMPLES)

[Summarize active kernel SLAB/SLUB calls (kmem\_cache\_alloc()), showing the top 20 caches every second:](#Summarize)

\# **slabratetop**

[Don't clear the screen, and top 8 rows only:](#Don't)

\# **slabratetop -Cr 8**

5 second summaries, 10 times only:

\# **slabratetop 5 10**

# [FIELDS](#FIELDS)

[loadavg:](#loadavg:)

The contents of /proc/loadavg

[CACHE](#CACHE)

Kernel cache name.

[ALLOCS](#ALLOCS)

Allocations (number of calls).

[BYTES](#BYTES)

Total bytes allocated.

# [OVERHEAD](#OVERHEAD)

If kmem\_cache\_alloc() is called at a high rate (eg, &gt;100k/second) the overhead of this tool might begin to be measurable. The rate can be seen in the ALLOCS column of the output.

# [SOURCE](#SOURCE)

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.

# [OS](#OS)

Linux

# [STABILITY](#STABILITY)

Unstable - in development.

# [AUTHOR](#AUTHOR)

Brendan Gregg

# [SEE ALSO](#SEE_ALSO)

[slabtop(1)](/man/enterprise-packages/bcc/slabtop.1)

2016-10-17 USER COMMANDS

---

Document: slabratetop(8) from bcc 0.37.0-r2 (Chainguard OS)
Source: https://github.com/iovisor/bcc
