How to get List processes – Linux Commands?

ps is the command which gives us reports a snapshot of the status of currently running processes. The process status command (ps) displays information about active processes.
Syntax: ps [options]


“ps -aux” print all processes owned by a user named “x”, as well as printing all processes that would be selected by the -a option. If the user named “x” does not exist, ps may interpret the command as “ps aux” instead and print a warning.

List processes by % cpu usage
ps -e -o pcpu,cpu,nice,state,cputime,args –sort pcpu |  sed ‘/^ 0.0 /d’

where,
-e: gives list of all processes
-o: give list in specify user-defined format
-sort: sort list of process by pcpu (percentage of CPU usages)

Category: Linux | Tags: ,

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: