Some of my favourite ps options.

ps fauxe

Gives you a complete list of all your running processes, complete of path, PID & UID. You may wish to remove some options like u (u stands for user - just type "faxe" or "fax" (very easy to remember indeed!)).

Useful in conjunction with the watch command (i.e.:when you want to ask a Linux System "how are you!").

Screenshot:

ps commands output.

ps aux|awk 'NR > 0 { s +=$3 }; END {print "cpu %",s}'

Prints the Global CPU usage (in percent) by using ps. Useful with bash scripts.

Who's sucking my CPU?

ps fauxe  | sort -r -k 3 | head -7

ps fauxe  | sort -r -k 3 | head -7

The previous ps command takes everything you'll need to know, its output then gets sorted by cpu consumption with the sort command and head filters the output by showing you the first 7 cpu hogs.

Rate this post