按内存使用情况对进程进行排序 [英] Sorting down processes by memory usage

查看:186
本文介绍了按内存使用情况对进程进行排序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以通过以下方式查看所有进程和内存的列表

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

ps aux 

并通过VSZ和RSS列数据。

and going through the VSZ and RSS column data.

是否存在

PS:按RSS值的降序排序此命令的输出的一种方法:这是一个新手问题,因为我对Unix / Linux。
ubuntu

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

推荐答案

RSS是第6列,因此您可以执行以下操作:

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

ps aux | sort -k6,6 -rn




  • 根据第6列进行排序 6,6 上的逗号表示,感谢twalberg ),通过数字方式进行反向操作(数量最多的是第一个)。

    • sort based on column 6 only (the comma on 6,6 makes it, thanks twalberg), numerically and reverse (the biggest number first).
    • 这篇关于按内存使用情况对进程进行排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆