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
Launch top
top

# Open the classic realtime process viewer.

Show threads in top
top -H

# Display per-thread activity inside top.

Watch specific PID
top -p 1234

# Focus top on one or more processes.

Launch htop
htop

# Open the interactive ncurses process monitor if installed.

Launch atop
sudo atop

# Capture system-wide resource and per-process metrics.

Launch btop
btop

# Use a modern TUI monitor if available.

## Per-Process Metrics
pidstat all processes
pidstat 1 5

# Sample process activity every second for five intervals.

pidstat CPU usage
pidstat -u 1 5

# Report CPU utilization by process.

pidstat memory usage
pidstat -r 1 5

# Show RSS and memory faults per process.

pidstat I/O usage
pidstat -d 1 5

# Show per-process block I/O activity.

pidstat per-thread stats
pidstat -t -u 1 5

# Break metrics down to thread level.

vmstat run queue and context switches
vmstat 1 5

# Inspect run queue, context switches, and system pressure.

Combine iostat with process view
iostat -xz 1

# Inspect disk pressure while correlating with pidstat or ps output.

## Memory and Open File Views
Show memory map for PID
pmap -x 1234 | head -40

# Display a process memory map with sizes and permissions.

Show proportional set size
smem -r | head

# Compare memory usage with PSS if smem is installed.

List open files for PID
lsof -p 1234

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

List open files by process name
lsof -c nginx

# Show open files for processes matching a name prefix.

Find deleted files still open
lsof +L1

# Find processes keeping deleted files open and consuming disk.

Read /proc status
cat /proc/1234/status

# Inspect status, memory, capabilities, and thread counts.

## Ports and Socket Monitoring
Show all TCP/UDP sockets with process info
ss -tulpn

# List listening and connected sockets with owning processes.

Show established TCP connections
ss -tnp state established

# Inspect established connections and owning processes.

Show process using port
lsof -i :5432

# Find which process uses a local port.

Show process IDs using port
fuser -v 5432/tcp

# Show owners of a TCP or UDP port.

Recommended next

No recommendations yet.