Sorting down processes by memory usage

…衆ロ難τιáo~ 提交于 2019-12-13 05:01:06

问题


I am able to see the list of all the processes and the memory via

ps aux 

and going through the VSZ and RSS column data.

Is there a way to sort down the output of this command by the descending order on RSS value ?.

PS : This is a newbie question as I am very much new to Unix/Linux. ubuntu


回答1:


RSS is the 6th column, so you can do it as follows:

ps aux | sort -k6,6 -rn
  • sort based on column 6 only (the comma on 6,6 makes it, thanks twalberg), numerically and reverse (the biggest number first).


来源:https://stackoverflow.com/questions/19031490/sorting-down-processes-by-memory-usage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!