Sort textual output by memory use.

Section: Non-interactive companions

List top memory consumers with ps

bash
bash
ps -eo pid,user,%cpu,%mem,comm --sort=-%mem | head
Explanation

Useful for tickets and postmortems where pasteable output matters.

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 Non-interactive companions
List top CPU consumers with ps
Get a quick textual top list.
OpenIn sheetbashsame section
Capture a batch snapshot with top
Use top when you need non-interactive output.
OpenIn sheetbashsame section
Read detailed status from /proc
Inspect one process beyond what htop shows.
OpenIn sheetbashsame section
Inspect limits for a process
Check open-file or resource limits.
OpenIn sheetbashsame section
List threads for one PID with ps
Inspect thread-level CPU consumers.
OpenIn sheetbash1 tag match
Use smem for proportional memory analysis
Pair htop with PSS-focused memory reporting when available.
OpenIn sheetbash1 tag match