2026-03-12 21:01:38
This commit is contained in:
38
tiddlywiki/Orcle Resource Manager.txt
Executable file
38
tiddlywiki/Orcle Resource Manager.txt
Executable file
@@ -0,0 +1,38 @@
|
||||
select name from v$rsrc_plan where is_top_plan='TRUE' and cpu_managed='ON';
|
||||
|
||||
col plan for a30
|
||||
col group_or_subplan for a30
|
||||
|
||||
select plan, group_or_subplan, type, cpu_p1, cpu_p2, cpu_p3, cpu_p4, status
|
||||
from dba_rsrc_plan_directives order by 1,2,3,4,5,6 desc;
|
||||
|
||||
|
||||
SELECT group_or_subplan,
|
||||
cpu_p1,
|
||||
mgmt_p1,
|
||||
mgmt_p2,
|
||||
mgmt_p3,
|
||||
mgmt_p4,
|
||||
mgmt_p5,
|
||||
mgmt_p6,
|
||||
mgmt_p7,
|
||||
mgmt_p8,
|
||||
max_utilization_limit
|
||||
FROM dba_rsrc_plan_directives
|
||||
WHERE plan = (SELECT name
|
||||
FROM v$rsrc_plan
|
||||
WHERE is_top_plan = 'TRUE');
|
||||
|
||||
SELECT TO_CHAR (m.begin_time, 'YYYY-MM-DD HH24:MI:SS') time,
|
||||
m.consumer_group_name,
|
||||
m.cpu_consumed_time / 60000 avg_running_sessions,
|
||||
m.cpu_wait_time / 60000 avg_waiting_sessions,
|
||||
d.mgmt_p1
|
||||
* (SELECT VALUE
|
||||
FROM v$parameter
|
||||
WHERE name = 'cpu_count')
|
||||
/ 100
|
||||
allocation
|
||||
FROM v$rsrcmgrmetric_history m, dba_rsrc_plan_directives d, v$rsrc_plan p
|
||||
WHERE m.consumer_group_name = d.group_or_subplan AND p.name = d.plan
|
||||
ORDER BY m.begin_time, m.consumer_group_name;
|
||||
Reference in New Issue
Block a user