slabtop: showing memory slab usage for the Linux kernel
displays the slab usage of Linux system
Typical usage: memory leakage detection, process monitoring, troubleshootingIntroduction 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 system | Package name | Installation |
---|---|---|
AlmaLinux | procps-ng |
|
Arch Linux | procps-ng |
|
Debian | procps |
|
Fedora | procps-ng |
|
Red Hat Enterprise Linux | procps-ng |
|
Rocky Linux | procps-ng |
|
openSUSE | procps |
|
Ubuntu | procps |
|
Your Linux distribution using a different package? Share your feedback.
Usage
Available options
Long option | Short option | Description |
---|---|---|
--delay=SECONDS | -d | Change the default delay of 3 seconds |
--once | -o | Only show the slab details once then quit |
--sort=COLUMN | -s | Change 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 combination | Action |
---|---|
a | Sort by number of active objects (ACTIVE) |
b | Sort by objects per slab (OBJ/SLAB) |
c | Sort by cache size (CACHE SIZE) |
l | Sort by number of slabs (SLABS |
v | Sort by number of active slabs |
false | Sort by name (NAME) |
o | Sort by number of objects (OBJS) |
p | Sort by pages per slab |
s | Sort by object size (OBJ SIZE) |
u | Sort 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:
Command | Category | Summary |
---|---|---|
basename | files | Strips directory and file name suffix from a given path |
capsh | capabilities | Linux capabilities testing and debugging tool |
captest | capabilities | Capabilities and privilege escalation testing tool |
chrt | processes | Sets Linux scheduler policy and priority for a process or command |
dmesg | logging | Shows kernel log messages |
dmidecode | hardware | Shows hardware information |
filecap | capabilities | Display of Linux capabilities set on binaries in paths |
firejail | sandboxing | Sandboxing tool for Linux |
getcap | capabilities | Show file capabilities |
getpcaps | capabilities | Show process capabilities |
kill | processes | Sending signals to processes |
lsns | namespaces | Shows used namespaces |
lsusb | capabilities | Show USB devices |
netcap | capabilities | Display available capabilities for running processes using network sockets |
nice | processes | Runs commands with specified priority |
numactl | processes | Controls NUMA policy for processes and shared memory |
peekfd | processes | Tracks a process and show file descriptor activity |
pidof | processes | Returns process IDs for a process name |
pidstat | monitoring | Monitoring CPU, memory, and disk activity |
pidwait | processes | Wait for process to stop |
pmap | processes | Shows memory mapping of process |
prtstat | processes | Shows process details for selected process like state, CPU and memory usage |
pscap | capabilities | Display available capabilities for running processes |
pslog | logging | Shows which log files a process has opened |
pstree | processes | Show active processes and children like a tree |
pwdx | processes | Shows current working directory of a process |
renice | processes | Changes the priority of running processes |
setcap | capabilities | Add or remove Linux capabilities to a file |
smem | memory | Show memory usage including swap |
strace | process inspection | Inspects running process |
uname | system information | Shows basic system information |
units | data conversion | Converts a unit into another one, like from Celcius to Fahrenheit |
vmstat | memory | Shows virtual memory information, disk IO, CPU activity |
watch | processes | Monitors changes in output of specified command |