Difference between revisions of "Ps"
From Linuxintro
imported>ThorstenStaerk |
imported>ThorstenStaerk (show the top cpu-consuming processes) |
||
Line 6: | Line 6: | ||
= Usecases = | = Usecases = | ||
− | * Show all running processes | + | * Show all running processes: |
ps auxf | grep -E "^[^ ]+ +[^ ]+ +[^ ]+ +[^ ]+ +[^ ]+ +[^ ]+ +[^ ]+ +R" | ps auxf | grep -E "^[^ ]+ +[^ ]+ +[^ ]+ +[^ ]+ +[^ ]+ +[^ ]+ +[^ ]+ +R" | ||
+ | * Show the top cpu-consuming processes: | ||
+ | ps -eo pcpu,pid,user,args | [[sort]] -k 1 -r | [[head]] -10 | ||
= See also = | = See also = | ||
* [http://man-wiki.net/index.php/ps ps' man page] | * [http://man-wiki.net/index.php/ps ps' man page] |
Revision as of 04:22, 5 October 2010
ps is a command to list all processes. You can invoke it like this:
ps ps -A ps -ef ps -auxf
Usecases
- Show all running processes:
ps auxf | grep -E "^[^ ]+ +[^ ]+ +[^ ]+ +[^ ]+ +[^ ]+ +[^ ]+ +[^ ]+ +R"
- Show the top cpu-consuming processes:
ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10