-
Notifications
You must be signed in to change notification settings - Fork 313
/
aw.sql
49 lines (42 loc) · 1.74 KB
/
aw.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
-- Copyright 2018 Tanel Poder. All rights reserved. More info at http://tanelpoder.com
-- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions.
COL w_metric_value HEAD METRIC_VALUE FOR 9,999,999,999,999.99
prompt What's going on right now?!
prompt Showing System metrics from V$SYSMETRIC...
SELECT
metric_name
, ROUND(value,2) w_metric_value
, metric_unit
FROM
v$sysmetric
WHERE
metric_name IN (
'Average Active Sessions'
, 'Average Synchronous Single-Block Read Latency'
, 'CPU Usage Per Sec'
, 'Background CPU Usage Per Sec'
, 'DB Block Changes Per Txn'
, 'Executions Per Sec'
, 'Host CPU Usage Per Sec'
, 'I/O Megabytes per Second'
, 'I/O Requests per Second'
, 'Logical Reads Per Txn'
, 'Logons Per Sec'
, 'Network Traffic Volume Per Sec'
, 'Physical Reads Per Sec'
, 'Physical Reads Per Txn'
, 'Physical Writes Per Sec'
, 'Redo Generated Per Sec'
, 'Redo Generated Per Txn'
, 'Response Time Per Txn'
, 'SQL Service Response Time'
, 'Total Parse Count Per Txn'
, 'User Calls Per Sec'
, 'User Transaction Per Sec'
)
AND group_id = 2 -- get last 60 sec metrics
ORDER BY
metric_name
/
PROMPT
@ash/w &1