topOpen the classic realtime process viewer.
Interactive and sampled monitoring for Linux processes, threads, memory, sockets, and scheduler behavior.
Realtime views of CPU, memory, and thread activity.
topOpen the classic realtime process viewer.
top -HDisplay per-thread activity inside top.
top -p 1234Focus top on one or more processes.
htopOpen the interactive ncurses process monitor if installed.
sudo atopCapture system-wide resource and per-process metrics.
btopUse a modern TUI monitor if available.
Capture CPU, memory, and scheduler statistics over time.
Sample process activity every second for five intervals.
pidstat 1 5Sample process activity every second for five intervals.
pidstat -u 1 5Report CPU utilization by process.
pidstat -r 1 5Show RSS and memory faults per process.
pidstat -d 1 5Show per-process block I/O activity.
pidstat -t -u 1 5Break metrics down to thread level.
Inspect run queue, context switches, and system pressure.
vmstat 1 5Inspect run queue, context switches, and system pressure.
Inspect disk pressure while correlating with pidstat or ps output.
iostat -xz 1Inspect disk pressure while correlating with pidstat or ps output.
Inspect RSS, maps, and open files of running processes.
pmap -x 1234 | head -40Display a process memory map with sizes and permissions.
smem -r | headCompare memory usage with PSS if smem is installed.
lsof -p 1234Show files, sockets, and descriptors opened by a process.
Show open files for processes matching a name prefix.
lsof -c nginxShow open files for processes matching a name prefix.
Find processes keeping deleted files open and consuming disk.
lsof +L1Find processes keeping deleted files open and consuming disk.
cat /proc/1234/statusInspect status, memory, capabilities, and thread counts.
Relate processes to network sockets.
List listening and connected sockets with owning processes.
ss -tulpnList listening and connected sockets with owning processes.
ss -tnp state establishedInspect established connections and owning processes.
lsof -i :5432Find which process uses a local port.
fuser -v 5432/tcpShow owners of a TCP or UDP port.