SLABTOP(1)

๐Ÿ“ฆ
version 4.0.7 ยท 4 versions
, in alpine 3.23, alpine 3.24, arch rolling, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu stonking

๐Ÿ’– SLABTOP(1) ๐Ÿ’–

okay bestie, so this is a page from the General Commands Manual and it's all about a little icon called slabtop. Buckle up, we're going into the kernel's closet. ๐Ÿงšโœจ


๐ŸŒธ NAME ๐ŸŒธ

slabtop โ€” display kernel slab cache information in real time ๐Ÿซถ


โœจ SYNOPSIS โœจ

slabtop [option ...]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

slabtop shows you the detailed kernel slab cache information in real time. It's giving live feed, no cap. It displays a listing of the top caches, sorted by one of the sort criteria listed below, and it also shows a statistics header stuffed with slab layer info. It's literally the main character of cache monitoring. ๐Ÿ‘‘


๐Ÿ’… OPTIONS ๐Ÿ’…

So the normal way to run slabtop is with zero options, it just vibes. But if you wanna fine-tune the behavior, you can pass one or more of these flags:

  • -d, --delay=N โ€” refresh the display every n seconds. By default, slabtop refreshes every three seconds. To exit the program, hit q. ๐Ÿšช This cannot be combined with the -o option. not me warning you twice
  • -s, --sort=S โ€” sort by S, where S is one of the sort criteria.
  • -o, --once โ€” display the output once and then exit. one and done, periodt. ๐Ÿ’ซ
  • --human โ€” show slab sizes automatically scaled to the shortest three digit unit and display the units of the print out. These are the units used:
    • B = bytes
    • Ki = kibibyte
    • Mi = mebibyte
    • Gi = gibibyte
    • Ti = tebibyte
    • Pi = pebibyte

If this flag is not used, the slab sizes will be shown in KiB. (iykyk) ๐ŸŒˆ

  • -V, --version โ€” display version information and exit.
  • -h, --help โ€” display usage information and exit. ๐ŸŽ€

๐Ÿ”ฅ SORT CRITERIA ๐Ÿ”ฅ

These are the valid sort criteria used to sort the individual slab caches, which is how we decide what counts as the "top" slab caches to display. The default sort criteria is to sort by the number of objects (o). slay.

You can also change the sort criteria while slabtop is running by pressing the associated character. group chat keyboard energy ๐Ÿ’ฌ

  • a โ€” number of active objects โ€” header ACTIVE
  • b โ€” objects per slab โ€” header OBJ/SLAB
  • c โ€” cache size โ€” header CACHE SIZE
  • l โ€” number of slabs โ€” header SLABS
  • v โ€” number of active slabs โ€” header N/A
  • n โ€” name โ€” header NAME
  • o โ€” number of objects โ€” header OBJS
  • p โ€” pages per slab โ€” header N/A
  • s โ€” object size โ€” header OBJ SIZE
  • u โ€” cache utilization โ€” header USE

๐ŸŽ€ COMMANDS ๐ŸŽ€

slabtop accepts keyboard commands from you while it's running. Here's what's supported. For letters, both cases are accepted. very inclusive of it ๐Ÿ’–

Each of the valid sort characters is also accepted, to change the sort routine. See the section SORT CRITERIA above. ๐Ÿ‘†

  • <SPACEBAR> โ€” refresh the screen. โœจ
  • Q โ€” quit the program. bye bestie ๐Ÿ˜ญ

๐Ÿ“ FILES ๐Ÿ“

  • /proc/slabinfo โ€” slab information

๐Ÿ’œ SEE ALSO ๐Ÿ’œ

free(1), ps(1), top(1), vmstat(8)


๐ŸŒธ NOTES ๐ŸŒธ

Right now, slabtop requires a 2.4 or later kernel โ€” specifically, a version 1.1 or later /proc/slabinfo. Kernel 2.2 should be supported in the future. manifesting it ๐Ÿ•ฏ๏ธโœจ

The slabtop statistic header is tracking how many bytes of slabs are being used, and it is not a measure of physical memory. The 'Slab' field in the /proc/meminfo file is what's tracking information about used slab physical memory. two different things bestie, don't mix them up ๐Ÿ™ˆ

The CACHE SIZE column is not accurate โ€” it's the upper limit of memory used by a specific slab. When a system using slub (the most common case) is under high memory pressure, there are slab order fallbacks, which means "pages per slab" is not constant and may decrease. ๐Ÿ’€ so yeah, read that column with love but also with skepticism.

๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

Written by Chris Rivera and Robert Love.

slabtop was inspired by Martin Bligh's perl script, vmtop. iconic origin story fr fr ๐ŸŒŸ


๐Ÿซถ REPORTING BUGS ๐Ÿซถ

Please send bug reports to procps@freelists.org. don't be shy, they wanna hear from you ๐Ÿ’Œ


okay that's the whole page, you ate it, you're a kernel slab expert now no cap ๐Ÿ’…

this was brought to you by procps-ng, dated 2023-12-26 โ€” mwah, go check your slab caches, bestie ๐Ÿฆ‹โœจ

๐Ÿ“ฆ where this page comes from