Show processes ordered by memory use.
ps aux --sort=-%mem | headShow a snapshot of processes. This format lists processes for all users.
ps [OPTION]...Show processes ordered by memory use.
ps aux --sort=-%mem | headShow selected fields for process 1234.
ps -p 1234 -o pid,ppid,stat,cmd| Option / clause | Description |
|---|---|
-e, -A | Select all processes. |
-f | Use full-format listing. |
-u USER | Select processes for USER and show user-oriented format. |
-p PIDLIST | Select processes by process ID. |
--sort=KEY | Sort output by a process field (implementation-specific keys). |
aux / -ef | Common BSD-style / UNIX-style process listings. |
Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.