Skip to Main Content

Japanese

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle11gの使用メモリ量の調査方法(SGAとPGAの合計)

620658Mar 2 2011 — edited Mar 8 2011
RHEL5.5とOracleDB11.2 でOracleDBメモリ使用量を取得したいのですが、良い方法がありますか。

下記SQLを作って手動で合計したのですが、実際より多い使用量が取れてしまっているようで困っています。
下記SQLの合計が777MB。「free -m」で取得した使用量が589MB(実メモリ540MB+swap49MB。OracleとOSでの使用量。)です。


-- PGA調査
select v.*, to_char(sysdate, 'yyyy/mm/dd_hh24:mi:ss') NOW
from V$PGASTAT v
where name in
(
'cache hit percentage'
,'total PGA allocated' --割当済の現行PGA
,'maximum PGA allocated' --割当済の現行PGA
)
order by name
;

--SGA調査
--buffer_cache
select 2 no, v.pool, v.name, v.bytes, to_char(sysdate, 'yyyy/mm/dd_hh24:mi:ss') now
from V$SGASTAT v
where name in(
'buffer_cache' --バッファ・キャッシュ
)
--共有プール
union all
select 1 no, 'shared pool' POOL, 'shared pool total' NAME, sum(BYTES) BYTES, to_char(sysdate, 'yyyy/mm/dd_hh24:mi:ss') now
from V$SGASTAT v
where pool ='shared pool'
--ラージ・プール
union all
select 3 no, 'large pool' POOL, 'large pool total' NAME, sum(BYTES) BYTES, to_char(sysdate, 'yyyy/mm/dd_hh24:mi:ss') now
from V$SGASTAT v
where pool ='large pool'
--Javaプール
union all
select 4 no, 'java pool' POOL, 'java pool total' NAME, sum(BYTES) BYTES, to_char(sysdate, 'yyyy/mm/dd_hh24:mi:ss') now
from V$SGASTAT v
where pool ='java pool'
--その他
union all
select 5 no, 'その他' POOL, 'その他 total' NAME, sum(BYTES) BYTES, to_char(sysdate, 'yyyy/mm/dd_hh24:mi:ss') now
from V$SGASTAT v
where (pool is NULL or pool not in ('shared pool', 'large pool', 'java pool'))
and (name is NULL or name <> 'buffer_cache')
order by no, pool, name

Edited by: taniguchi_user617655 on Mar 2, 2011 6:35 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 5 2011
Added on Mar 2 2011
4 comments
35,259 views