slabtop: showing memory slab usage for the Linux kernel

displays the slab usage of Linux system

Typical usage: memory leakage detection, process monitoring, troubleshooting

Introduction into slabtop

The slabtop tool is similar to top but with focus on showing slab allocation. Slab allocation is a mechnism of the kernel to store memory pages as efficient as possible. Slabtop is useful for developers and system administrators to monitor or learn more about the memory usage and allocation of the Linux kernel.

Installation

When slabtop is not installed by default, it can be added to the system using the relevant software package.

Package information for slabtop

Operating systemPackage nameInstallation
AlmaLinuxprocps-ng
dnf install procps-ng
Arch Linuxprocps-ng
pacman -S procps-ng
Debianprocps
apt install procps
Fedoraprocps-ng
dnf install procps-ng
Red Hat Enterprise Linuxprocps-ng
dnf install procps-ng
Rocky Linuxprocps-ng
dnf install procps-ng
openSUSEprocps
zypper install procps
Ubuntuprocps
apt install procps

Your Linux distribution using a different package? Share your feedback.

Usage

Available options

Long optionShort optionDescription
--delay=SECONDS-dChange the default delay of 3 seconds
--once-oOnly show the slab details once then quit
--sort=COLUMN-sChange the column to sort on (see also the keys that can be used)

Missing an option in this overview? Share your feedback.

Shortcuts and keys

Key or key combinationAction
aSort by number of active objects (ACTIVE)
bSort by objects per slab (OBJ/SLAB)
cSort by cache size (CACHE SIZE)
lSort by number of slabs (SLABS
vSort by number of active slabs
falseSort by name (NAME)
oSort by number of objects (OBJS)
pSort by pages per slab
sSort by object size (OBJ SIZE)
uSort by cache utilization (USE)

Frequently Asked Questions

What is the slabtop command and its purpose?

The slabtop command is a command-line tool to show the memory slab usage of the Linux

Which package provides the slabtop command?

The command slabtop is provided by the procps or procps-ng package.

Related and similar commands

Linux has a lot of tools and commands available and sometimes you just need that little other tool. Here is a list of commands that are similar or related to slabtop:

Related and similar commands to slabtop
CommandCategorySummary
basenamefilesStrips directory and file name suffix from a given path
capshcapabilitiesLinux capabilities testing and debugging tool
captestcapabilitiesCapabilities and privilege escalation testing tool
chrtprocessesSets Linux scheduler policy and priority for a process or command
dmesgloggingShows kernel log messages
dmidecodehardwareShows hardware information
filecapcapabilitiesDisplay of Linux capabilities set on binaries in paths
firejailsandboxingSandboxing tool for Linux
getcapcapabilitiesShow file capabilities
getpcapscapabilitiesShow process capabilities
killprocessesSending signals to processes
lsnsnamespacesShows used namespaces
lsusbcapabilitiesShow USB devices
netcapcapabilitiesDisplay available capabilities for running processes using network sockets
niceprocessesRuns commands with specified priority
numactlprocessesControls NUMA policy for processes and shared memory
peekfdprocessesTracks a process and show file descriptor activity
pidofprocessesReturns process IDs for a process name
pidstatmonitoringMonitoring CPU, memory, and disk activity
pidwaitprocessesWait for process to stop
pmapprocessesShows memory mapping of process
prtstatprocessesShows process details for selected process like state, CPU and memory usage
pscapcapabilitiesDisplay available capabilities for running processes
pslogloggingShows which log files a process has opened
pstreeprocessesShow active processes and children like a tree
pwdxprocessesShows current working directory of a process
reniceprocessesChanges the priority of running processes
setcapcapabilitiesAdd or remove Linux capabilities to a file
smemmemoryShow memory usage including swap
straceprocess inspectionInspects running process
unamesystem informationShows basic system information
unitsdata conversionConverts a unit into another one, like from Celcius to Fahrenheit
vmstatmemoryShows virtual memory information, disk IO, CPU activity
watchprocessesMonitors changes in output of specified command