OraclePerformance
Load right now (last 60 seconds)
Host CPU, average active sessions, transactions, redo and I/O rates from V$SYSMETRIC. Compare average active sessions with your CPU count to judge whether the box is saturated.
Not yet verified. How scripts are tested
1CLEAR COLUMNS2SET LINESIZE 120 PAGESIZE 100 TRIMOUT ON TAB OFF3COLUMN metric_name HEADING "METRIC" FORMAT A404COLUMN value FORMAT 999,999,999,990.95COLUMN metric_unit HEADING "UNIT" FORMAT A35 TRUNCATE6 7SELECT metric_name, ROUND(value, 1) AS value, metric_unit8FROM v$sysmetric9WHERE group_id = 210 AND metric_name IN ('Host CPU Utilization (%)', 'Average Active Sessions',11 'Database CPU Time Ratio', 'Executions Per Sec',12 'User Transaction Per Sec', 'Physical Read Total Bytes Per Sec',13 'Redo Generated Per Sec', 'Logons Per Sec', 'Current Logons Count')14ORDER BY metric_name;Save it as ora-load-now.sql and run it with SQL> @ora-load-now.
Part of these runbooks
More Oracle scripts: Performance
- What active sessions are doing right nowActive user sessions grouped by wait event, with CPU shown separately. A quick live picture before you reach for ASH.
- Top wait events since startupThe 15 non-idle waits with the most total time since the instance started, with average wait in milliseconds. Averages matter: 'db file sequential…
- Top 20 SQL by elapsed timeFrom V$SQLSTATS, which is cheaper to query than V$SQL. Feed the SQL_ID into the execution plan script to see how it runs.
- Top sessions by CPU usedConnected sessions ranked by total CPU seconds since they logged on. Good for finding the one batch job or report hammering the box.