← linux commands
Views:
ps command
The ps command is used to output running processes' status and information.
Syntax: ps [options]
Example: I have created a simple http server using python. So that we can list and see its process information.
ps

Options:
-a
Display information about other users' processes as well as your own. This will skip any processes which do not have a controlling terminal.
Example:
ps -a

-C
List process with command name.
Example:
ps -C python3

-o
For custom output format.
Example: In following command, we are outputing only the pid and command for process with python3 as executable command name.
ps -C python3 -o pid,cmd

Example: Outputing process memory consumption.
ps -o pid,%mem
