免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 10779 | 回复: 5
打印 上一主题 下一主题

[新手入门] 用nmon或topas命令查看所占用内存,这个数据是不是正确的? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-05-24 15:34 |只看该作者 |倒序浏览
Memory
          Physical  PageSpace
% Used       99.8%      0.1%
% Free        0.2%     99.9%
MB Used   63330.5MB    92.7MB
MB Free     157.5MB 65443.3MB
Total(MB) 63488.0MB 65536.0MB

这里显示内存占用几乎100%,但使用ps aux命令来查看%MEM列,几乎都为0。
# ps aux
USER         PID %CPU %MEM   SZ  RSS    TTY STAT    STIME  TIME COMMAND
oraprod   647924  6.1  0.0 165048 232620      - A    13:59:54 89:49 oraclePROD (LOC
root         822  2.9  0.0  384  384      - A      Mar 18 44526:49 wait
root       13116  2.9  0.0  384  384      - A      Mar 18 44494:14 wait
root         554  2.9  0.0  384  384      - A      Mar 18 44371:31 wait
root       12848  2.9  0.0  384  384      - A      Mar 18 44334:06 wait
root         286  2.8  0.0  384  320      - A      Mar 18 43266:48 wait
root       12580  2.8  0.0  384  320      - A      Mar 18 43225:53 wait
root        8196  2.7  0.0  384  320      - A      Mar 18 42006:18 wait
root       49176  2.7  0.0  384  320      - A      Mar 18 41931:57 wait
root       16946  2.5  0.0  384  384      - A      Mar 18 38691:17 wait
root       21044  2.5  0.0  384  384      - A      Mar 18 38654:03 wait
root       53274  2.5  0.0  384  384      - A      Mar 18 38551:38 wait
root       57372  2.5  0.0  384  320      - A      Mar 18 38488:45 wait
root       17214  2.5  0.0  384  384      - A      Mar 18 38076:11 wait
root       21312  2.5  0.0  384  320      - A      Mar 18 38042:08 wait
root       16678  2.4  0.0  384  320      - A      Mar 18 37349:19 wait
root       20776  2.4  0.0  384  320      - A      Mar 18 37293:24 wait
oraprod  1421494  1.3  0.0 156564 224136      - A    15:16:34  3:15 oraclePROD (LOC
oraprod   521178  0.8  0.0 157044 224616      - A    09:03:39 50:55 oraclePROD (LOC
oraprod  1274034  0.5  0.0 157888 225460      - A    13:30:48  9:21 oraclePROD (LOC
oraprod   327754  0.2  0.0 155772 223344      - A    13:48:08  3:43 oraclePROD (LOC
oraprod  1520058  0.2  0.0 238592 306164      - A    13:30:16  4:12 oraclePROD (LOC
oraprod   975732  0.2  0.0 147280 214852      - A    15:15:20  0:33 oraclePROD (LOC
oraprod   922540  0.2  0.0 189612 257184      - A    09:05:54 10:15 oraclePROD (LOC

请问这是为什么?

论坛徽章:
12
CU大牛徽章
日期:2013-09-18 15:20:4815-16赛季CBA联赛之同曦
日期:2016-02-01 20:28:25IT运维版块每日发帖之星
日期:2015-11-10 06:20:00操作系统版块每日发帖之星
日期:2015-10-28 06:20:002015亚冠之塔什干棉农
日期:2015-06-04 11:41:56丑牛
日期:2014-05-10 16:11:33技术图书徽章
日期:2013-09-23 13:25:58CU大牛徽章
日期:2013-09-18 15:21:17CU大牛徽章
日期:2013-09-18 15:21:12CU大牛徽章
日期:2013-09-18 15:21:06CU大牛徽章
日期:2013-09-18 15:20:58数据库技术版块每日发帖之星
日期:2016-02-08 06:20:00
2 [报告]
发表于 2011-05-24 15:40 |只看该作者
你先了解下这几个字段的含义,不要望文生义

论坛徽章:
0
3 [报告]
发表于 2011-05-24 17:14 |只看该作者
你先了解下这几个字段的含义,不要望文生义
mike79 发表于 2011-05-24 15:40



大师能麻烦说得详细些吗?

论坛徽章:
0
4 [报告]
发表于 2011-05-25 09:10 |只看该作者
可以man一下ps
里面有%MEM的解释

The percentage of real memory used by this process. The %MEM value tends the exaggerate the cost of a process that is sharing program text with other processes. It does not account for times when multiple copies of a program are run and a copy of the program text is shared by all instances. The size of the text section is accounted for in every instance of the program. This means that if several copies of a program are run, the total %MEM value of all processes could exceed 100%.


其次从你ps -aux的信息看不出具体内存的使用情况,你截屏太少了

论坛徽章:
0
5 [报告]
发表于 2011-05-25 10:11 |只看该作者
可以man一下ps
里面有%MEM的解释

The percentage of real memory used by this process. The %MEM valu ...
InfoSVC 发表于 2011-05-25 09:10


对这段英文看不太明白。但有AIX命令的中文参考,截图如下:

按它的意思不就是实际使用内存吗?
我看过所有的进程,%MEM这列都是0.0。

论坛徽章:
0
6 [报告]
发表于 2011-05-26 10:28 |只看该作者
这个的统计信息是说一个程序在其使用过程中使用的所有内存包括共享内存以及堆栈数据等,由于共享内存可能出现重复使用,所以这个信息会比实际使用的内存值要大,并且有可能会超过100%
这是这段解释.

我不是很清楚mem%这个信息在系统级别倒是是按照一个什么时间片来统计的,但是从我这边的主机上来看,这个参数确实大部分时间是0的

建议你看内存不要使用ps aux了,用用nmon或则svmon吧
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP