ps

List running processes with their resource use

ps Processes and system GPL-2.0-or-later

About

ps prints a snapshot of the processes on the system, with their identifiers, owners and resource consumption. It is the go-to command for a quick, scriptable look at what is running right now. Unlike a live monitor it exits immediately, so it pipes easily into other tools.

Install it

pkg install procps

Run this inside Termux. If the package is already present, pkg will say so and do nothing.

Commands worth knowing

6 of the invocations you will actually reach for. Tap the copy button to put one on your clipboard.

ps aux Show every process with its full command line and memory use. The quickest way to spot something running that should not be.
ps -e List all running processes, one per line. A plain system-wide view.
ps u 4321 Show detailed information for a single process identifier. Includes its owner and processor time.
ps aux --sort=-%mem Sort the full listing by memory. The heaviest consumers rise to the top.
ps -o pid,comm,%cpu,%mem Choose exactly which columns appear. Output stays narrow and easy to read inside a script.
ps axjf Display the process hierarchy as a tree. See which parent spawned which child.

Worked example

Run ps aux and this is what you should see.

termux
$ ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY   STAT START   TIME COMMAND
u0_a123   4321  0.7  2.3 1234567 23456 pts/0 S    10:12   0:03 com.termux
root       201  0.0  0.4  123456  7890 ?     Ss   09:00   0:00 init

Developed by

procps-ng project · released under GPL-2.0-or-later.