在AIX中计算ORACLE消耗的私有内存总数

一早就收到兄弟伙发的QQ信息,关于aix中oracle内存计算的内容

The RSS number is equal to the sum of the number of working-segment pages in memory times 4 and
the code-segment pages in memory times 4.

The TRS number is equal to just the code-segment pages in memory times 4.

Please note that an AIX memory page is 4096 bytes, which is why the number of memory pages must be multiplied by 4 to get the value for
RSS and TRS (which are each reported in kilobytes).  For example, if the actual memory used by the code-segment was 2 pages
( 2 pages * 4096 byte page size = 8192 bytes), then the TRS value would be reported as 8 ( 2 {number of pages} * 4 = 8 {kilobytes} ).

Since RSS includes both working-segment and code-segment pages, if we subtract TRS, which is just the code-segment pages, from RSS, we are
left with only the working-segment pages, or private memory.  In the example above, the oracle pmon background process is using...

  13904 (RSS) - 13512 (TRS) = 392
  392 * 1024 = 401408 bytes

The correct amount of memory used by the pmon background process is 392k (401408 bytes), not 34 MB as reported by the "ps -lf" command.

The value of TRS will be approximately the same for all oracle background processes, since all of these processes are just different
invocations of the same $ORACLE_HOME/bin/oracle executable.


来自于AIX: Determining Oracle Memory Usage On AIX [ID 123754.1]


根据以上内容自己写了一条命令来查看


ps vx|grep ora|grep -v grep|awk '{sum+=($7-$10)};end{print sum/1024 "mb"}'

得到只是oracle消耗的私有内存的总量,不包含SGA等


查看每个oracle进程占用的私有内存:

ps vx|grep ora|awk '{print $1,($7-$10)/1024}'|sort -n -k2


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值