[二星]使用命令来查看当前用户下的所有程序的物理内存消耗
- oneleaf
- 论坛管理员
- 帖子: 10448
- 注册时间: 2005-03-27 0:06
- 系统: Ubuntu 12.04
[二星]使用命令来查看当前用户下的所有程序的物理内存消耗
1 任务内容: 使用命令来查看属于当前用户下的所有程序的物理内存消耗,并从大到小排序
2 任务的难度: 二星
3 任务的目的: 学习linux下的进程统计
4 任务所涉及的软件: ps
5 任务将大致消耗的时间: 1天
6 参考网站: man ps
2 任务的难度: 二星
3 任务的目的: 学习linux下的进程统计
4 任务所涉及的软件: ps
5 任务将大致消耗的时间: 1天
6 参考网站: man ps
- xhy
- 帖子: 3916
- 注册时间: 2005-12-28 1:16
- 系统: Ubuntu 12.10 X64
- 来自: 火星
- oneleaf
- 论坛管理员
- 帖子: 10448
- 注册时间: 2005-03-27 0:06
- 系统: Ubuntu 12.04
Re: [二星]使用命令来查看当前用户下的所有程序的物理内存消耗
不满足要求条件xhy 写了:代码: 全选
ps akvsz -o pid,vsz,cmd
- jarodlau
- 帖子: 501
- 注册时间: 2005-09-06 20:34
- 联系:
Re: [二星]使用命令来查看当前用户下的所有程序的物理内存消耗
代码: 全选
ps -U "username" -o pid,vsz,cmd
- oneleaf
- 论坛管理员
- 帖子: 10448
- 注册时间: 2005-03-27 0:06
- 系统: Ubuntu 12.04
Re: [二星]使用命令来查看当前用户下的所有程序的物理内存消耗
不满足: vsz是 virtual memory,不是实际物理内存,并没有按内存大小排序。jarodlau 写了:代码: 全选
ps -U "username" -o pid,vsz,cmd
- 自由建客
- 帖子: 13468
- 注册时间: 2008-07-30 23:21
- 系统: Debian stable AMD64
Re: [二星]使用命令来查看当前用户下的所有程序的物理内存消耗
怎么统计,不现实吧!共享库怎么算?
-
- 帖子: 88
- 注册时间: 2009-04-30 13:03
Re: [二星]使用命令来查看当前用户下的所有程序的物理内存消耗
新手,看完了 man ps 后得出这个命令,不知对否?
代码: 全选
ps -u username -o pid,user,size,cmd --sort -size
-
- 帖子: 31
- 注册时间: 2007-06-16 23:08
- oneleaf
- 论坛管理员
- 帖子: 10448
- 注册时间: 2005-03-27 0:06
- 系统: Ubuntu 12.04
Re: [二星]使用命令来查看当前用户下的所有程序的物理内存消耗
rss: 才是真实内存占用,因此为:rss RSS resident set size, the non-swapped physical memory that a task has used (in kiloBytes). (alias rssize, rsz).
vsz VSZ virtual memory size of the process in KiB (1024-byte units). Device mappings are currently excluded; this is subject to change. (alias vsize).
size SZ approximate amount of swap space that would be required if the process were to dirty all writable pages and then be swapped out. This number is very rough!
sz SZ size in physical pages of the core image of the process. This includes text, data, and stack space. Device mappings are currently excluded; this is subject to change. See vsz and rss.
代码: 全选
ps -u $USER -o pid,rss,cmd --sort -rss
-
- 帖子: 88
- 注册时间: 2009-04-30 13:03
Re: [二星]使用命令来查看当前用户下的所有程序的物理内存消耗
请问,size 表示的是什么 swap 吗?
rss 是包括共享内存?
rss 是包括共享内存?
- lxnnix
- 帖子: 89
- 注册时间: 2007-08-19 22:24
- 来自: 南京
-
- 帖子: 3
- 注册时间: 2009-12-09 23:34
Re: [二星]使用命令来查看当前用户下的所有程序的物理内存消耗
代码: 全选
ps -lyu username --sort -rss
- cdlxyx
- 帖子: 20
- 注册时间: 2010-10-16 2:41
- lxr1234
- 帖子: 721
- 注册时间: 2009-04-10 11:15
- 来自: 三民主义国国民权利省我的选择市中共下台镇
Re: [二星]使用命令来查看当前用户下的所有程序的物理内存消耗
top不是更简单吗?
强烈反对M$的ARM Secure Boot 锁定要求,大家请签名反对
http://www.fsf.org/campaigns/secure-boo ... cted-boot/
http://www.fsf.org/campaigns/secure-boo ... cted-boot/
- ctrl-fairy
- 帖子: 116
- 注册时间: 2011-04-28 18:05
Re: [二星]使用命令来查看当前用户下的所有程序的物理内存消耗
代码: 全选
ps -U $username -o pid,user,rss,cmd --sort=rss
代码: 全选
linux和windows对我等菜鸟,都是浮云!