Ravi Sir's Cards › AWS
ps vs pgrep
This comparison card contrasts ps and pgrep. ps Shows a process table. pgrep is described as prints matching PIDs. The card pairs ps with investigate load, and pgrep with script a check.
Read card text
What this card says
Process
ps
Shows a process table.
pgrep
Prints matching PIDs.
Key points
Rich columns, sort.
Short, good for scripts.
Example
ps aux --sort=-%mem
Use when
Investigate load.
Script a check.