Linux Process Monitoring

Interactive and sampled monitoring for Linux processes, threads, memory, sockets, and scheduler behavior.

View
StandardDetailedCompact
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all

Interactive Monitors

Realtime views of CPU, memory, and thread activity.

Launch top

Open the classic realtime process viewer.

bashANYtopmonitoring
bash
top
Notes

Open the classic realtime process viewer.

Show threads in top

Display per-thread activity inside top.

bashANYtopthreads
bash
top -H
Notes

Display per-thread activity inside top.

Watch specific PID

Focus top on one or more processes.

bashANYtoppid
bash
top -p 1234
Notes

Focus top on one or more processes.

Launch htop

Open the interactive ncurses process monitor if installed.

bashANYhtopmonitoring
bash
htop
Notes

Open the interactive ncurses process monitor if installed.

Launch atop

Capture system-wide resource and per-process metrics.

bashANYatopmonitoring
bash
sudo atop
Notes

Capture system-wide resource and per-process metrics.

Launch btop

Use a modern TUI monitor if available.

bashANYbtopmonitoring
bash
btop
Notes

Use a modern TUI monitor if available.

Per-Process Metrics

Capture CPU, memory, and scheduler statistics over time.

pidstat all processes

Sample process activity every second for five intervals.

bashANYpidstatmonitoring
bash
pidstat 1 5
Notes

Sample process activity every second for five intervals.

pidstat CPU usage

Report CPU utilization by process.

bashANYpidstatcpu
bash
pidstat -u 1 5
Notes

Report CPU utilization by process.

pidstat memory usage

Show RSS and memory faults per process.

bashANYpidstatmemory
bash
pidstat -r 1 5
Notes

Show RSS and memory faults per process.

pidstat I/O usage

Show per-process block I/O activity.

bashANYpidstatio
bash
pidstat -d 1 5
Notes

Show per-process block I/O activity.

pidstat per-thread stats

Break metrics down to thread level.

bashANYpidstatthreads
bash
pidstat -t -u 1 5
Notes

Break metrics down to thread level.

vmstat run queue and context switches

Inspect run queue, context switches, and system pressure.

bashANYvmstatscheduler
bash
vmstat 1 5
Notes

Inspect run queue, context switches, and system pressure.

Combine iostat with process view

Inspect disk pressure while correlating with pidstat or ps output.

bashANYiostatio
bash
iostat -xz 1
Notes

Inspect disk pressure while correlating with pidstat or ps output.

Memory and Open File Views

Inspect RSS, maps, and open files of running processes.

Show memory map for PID

Display a process memory map with sizes and permissions.

bashANYpmapmemory
bash
pmap -x 1234 | head -40
Notes

Display a process memory map with sizes and permissions.

Show proportional set size

Compare memory usage with PSS if smem is installed.

bashANYsmemmemory
bash
smem -r | head
Notes

Compare memory usage with PSS if smem is installed.

List open files for PID

Show files, sockets, and descriptors opened by a process.

bashANYlsoffiles
bash
lsof -p 1234
Notes

Show files, sockets, and descriptors opened by a process.

List open files by process name

Show open files for processes matching a name prefix.

bashANYlsoffiles
bash
lsof -c nginx
Notes

Show open files for processes matching a name prefix.

Find deleted files still open

Find processes keeping deleted files open and consuming disk.

bashANYlsofdeleted-files
bash
lsof +L1
Notes

Find processes keeping deleted files open and consuming disk.

Read /proc status

Inspect status, memory, capabilities, and thread counts.

bashANYprocstatus
bash
cat /proc/1234/status
Notes

Inspect status, memory, capabilities, and thread counts.

Ports and Socket Monitoring

Relate processes to network sockets.

Show all TCP/UDP sockets with process info

List listening and connected sockets with owning processes.

bashANYsssocketsprocesses
bash
ss -tulpn
Notes

List listening and connected sockets with owning processes.

Show established TCP connections

Inspect established connections and owning processes.

bashANYsstcp
bash
ss -tnp state established
Notes

Inspect established connections and owning processes.

Show process using port

Find which process uses a local port.

bashANYlsofport
bash
lsof -i :5432
Notes

Find which process uses a local port.

Show process IDs using port

Show owners of a TCP or UDP port.

bashANYfuserport
bash
fuser -v 5432/tcp
Notes

Show owners of a TCP or UDP port.

Recommended next

No recommendations yet.