Sort by memory and refresh quickly.
Section: Containers and services
Start a memory-focused out-of-memory investigation
bash
bash
sudo htop --sort-key=PERCENT_MEM -d 5Explanation
Good first step when a server is swapping or near OOM.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Containers and services
Run htop inside a running container
Inspect the process table from the container's perspective.
Run htop in a Kubernetes pod
Attach an interactive process view to a pod shell.
Watch only systemd-managed service processes by pattern
Generate a PID list for one service family.
Run htop inside tmux on a remote host
Keep monitoring alive if your connection drops.