To list the processes ordered by CPU and memory usage in Linux.
My resolution was this:
ps -eo pcpu,pid,user,args,pmem | sort -k 1 -r | head -10
And if you want to have a terminal listing it you can use this line:
for i in `seq 1 10`; do ps -eo pcpu,pid,user,args,pmem | sort -k 1 -r | head -10; sleep 1; clear; done
My resolution was this:
ps -eo pcpu,pid,user,args,pmem | sort -k 1 -r | head -10
And if you want to have a terminal listing it you can use this line:
for i in `seq 1 10`; do ps -eo pcpu,pid,user,args,pmem | sort -k 1 -r | head -10; sleep 1; clear; done
0 comments:
Post a Comment