logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Author

       Brendan Gregg

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), 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.

Examples

       Summarize active kernel SLAB/SLUB calls (kmem_cache_alloc()), showing the top 20 caches every second:
              # slabratetop

       Don't clear the screen, and top 8 rows only:
              # slabratetop-Cr8

       5 second summaries, 10 times only:
              # slabratetop510

Fields

       loadavg:
              The contents of /proc/loadavg

       CACHE  Kernel cache name.

       ALLOCS Allocations (number of calls).

       BYTES  Total bytes allocated.

Name

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

Options

       -C     Don't clear the screen.

       -r MAXROWS
              Maximum number of rows to print. Default is 20.

       interval
              Interval between updates, seconds.

       count  Number of interval summaries.

Os

       Linux

Overhead

       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.

Requirements

       CONFIG_BPF and bcc.

See Also

slabtop(1)

USER COMMANDS                                      2016-10-17                                     slabratetop(8)

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.

Stability

       Unstable - in development.

Synopsis

slabratetop[-h][-C][-rMAXROWS][interval][count]

See Also