oracle内存使用情况 和 进程数历史峰值

oracle进程数历史峰值和上限查询

SELECT RESOURCE_NAME "名称",
D.CURRENT_UTILIZATION "当前值",
MAX_UTILIZATION "使用峰值",
LIMIT_VALUE "设置的上限"
FROM V$RESOURCE_LIMIT D
where RESOURCE_NAME in ('processes', 'sessions');


内存使用情况

select name,round(total,2) total_MB,round(total-free,2) used_MB, round(free,2) free_MB, round((total-free)/total*100,2)||'%' USED_PER from
(select 'SGA' name,(select sum(value/1024/1024) from v$sga) total,
(select sum(bytes/1024/1024) from v$sgastat where name='free memory')free from dual)
union
select name,total,round(used,2)used,round(total-used,2)free,round(used/total*100,2)||'%' pctused from (
select 'PGA' name,(select value/1024/1024 total from v$pgastat where name='aggregate PGA target parameter')total,
(select value/1024/1024 used from v$pgastat where name='total PGA allocated')used from dual);

 

 



posted @ 2020-09-08 19:32  霸王龙的日常  阅读(881)  评论(0编辑  收藏  举报