Linux script to get most expensive processes
Emile van Sebille
emile at fenx.com
Tue Aug 4 22:52:39 CEST 2015
On 8/4/2015 1:19 PM, Cecil Westerhof wrote:
> Under Linux I like to get the most expensive processes. The two most
> useful commands are:
> ps -eo pid,user,pcpu,args --sort=-pcpu
> ps -eo pid,user,pcpu,args --sort=-vsize
> In my case I am only interested in the seven most expensive processes.
> For this I wrote the following script.
> Is this a reasonable way to do this? Getting the parameter is done
> quit simple, but I did not think fancy was necessary here.
My platform shows as linux2 and it worked fine for me when checking for
More information about the Python-list