Skip to content

Commit 32533a6

Browse files
authored
Create throttlingperconsumer.sql
This script provides information about resources consumed and wait times per consumer group.
1 parent 6b5b00d commit 32533a6

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
-- Displays a history (the last one hour) of resource manager metrics, taken from V$RSRCMGRMETRIC.
2+
-- When a resource plan is set, this history is cleared and restarted.
3+
-- This view provides information about resources consumed and wait times per consumer group.
4+
5+
set linesize window
6+
7+
select inst_id,
8+
to_char(begin_time, 'HH:MI') time,
9+
consumer_group_name,
10+
60 * (select value from v$osstat where stat_name = 'NUM_CPUS') total,
11+
60 * (select value from v$parameter where name = 'cpu_count') db_total,
12+
cpu_consumed_time / 1000 consumed,
13+
cpu_consumed_time /
14+
(select value from v$parameter where name = 'cpu_count') / 600 cpu_utilization,
15+
cpu_wait_time / 1000 throttled
16+
from gv$rsrcmgrmetric_history
17+
order by begin_time desc, consumer_group_name;

0 commit comments

Comments
 (0)