We use cookies to understand how the site is used and to display ads. Analytics and advertising only run after you accept. You can change your choice anytime. Privacy policy

Skip to content
devvkit
$devvkit learn --librarie procs-guide

procs Guide

[processes][cli][rust][tui]
System Monitoring
Install
brew install procs
# or: cargo install procs
# Windows: download from github.com/dalance/procs/releases
# Linux: download binary from releases

procs is a Rust-based ps alternative. It outputs a colorized table by default with columns for PID, name, CPU%, memory%, user, port, and Docker container name. It auto-senses the terminal width and adjusts columns accordingly.

Killer features: `--watch` for auto-refresh (like htop-lite), `--tree` for process hierarchy, search with `/` (interactive), Docker column showing which container owns each process, and configurable column layouts.

procs uses `--sort` with any column, `-a` for all users, filtering by keyword after a `--`. It's written in Rust and runs on Linux, macOS, and Windows. For interactive process management (killing, renicing), stick with htop.

Basic

List processes· Default colorized view.
procs                         # All user processes
procs -a                      # All processes (including system)
procs -a | head -20
procs --sort mem              # Sort by memory
procs --sort cpu              # Sort by CPU

Watch Mode

Watch mode· Auto-refresh every 2s.
procs --watch                 # Like htop but simpler
procs --watch=3               # Refresh every 3 seconds
procs --watch --sort cpu      # Watch sorted by CPU
procs --watch --tree          # Watch in tree mode

Filtering

Filter by keyword· Find specific processes.
procs nginx                   # All nginx processes
procs node                    # All node processes
procs --or java gradle        # Java OR gradle
procs --and nginx master      # nginx AND master
procs docker                  # All Docker-related processes
Docker-aware· Show container names.
procs --docker                # Show Docker column
procs --docker --sort docker  # Group by container
# Lists: PID, NAME, CPU, MEM, DISK, DOCKER
# Great for: finding which container is eating memory
Kill from output· Kill process by PID.
procs --sort mem              # Find memory hog
# Copy PID from first column, then:
# kill -9 <PID>
# Or use procs --watch and note the PID

# Procs doesn't have built-in kill (that's htop's job),
# but it makes finding the right PID easy

Tree View

Tree view· Process hierarchy.
procs --tree                  # Parent-child tree
procs --tree --sort mem       # Tree sorted by memory
procs --tree nginx            # Tree filtered to nginx
# Useful: see which PIDs are children of a service

Configuration

Custom columns· Choose what to show.
procs --only pid,name,cpu,mem,port,user
procs --only pid,ppid,name,cpu,mem,start-at,conns
# Available columns: pid, ppid, name, cpu, mem, user, port, tcp, udp, docker, disk, read, write, rss, vms, start-at, conns
Config file· Persistent defaults.
# ~/.config/procs/config.toml
# Default columns:
display = ["PID", "Name", "CPU", "Mem", "Port", "Docker"]
sort = "Mem"
# Skip system processes by default:
filter_system = true
# Watch refresh interval:
interval = 3
# Tree view by default:
tree = false