Quantcast
Channel: Doyensys Allappsdba Blog..
Viewing all articles
Browse latest Browse all 1640

Query to take CPU and MEMORY for a period in database

$
0
0
Please use the below query to get the output for a monthly CPU and memory.

SELECT to_char(rollup_timestamp,'DD-MON-YY HH24') "Date", average "DB Memory Usage %"
FROM MGMT\$METRIC_HOURLY
WHERE target_name like '%dbprod80%'
AND metric_name = 'Load'
AND metric_column = 'memUsedPct'
AND trunc(rollup_timestamp) between '$MONTH_STDATE' and '$MONTH_EDDATE';


SELECT to_char(rollup_timestamp,'DD-MON-YY HH24') "Date", average "DB CPU Usage %"
FROM MGMT\$METRIC_HOURLY
WHERE target_name like '%dbprod80%'
AND metric_name = 'Load'
AND metric_column = 'cpuUtil'
AND trunc(rollup_timestamp) between '$MONTH_STDATE' and '$MONTH_EDDATE';


Viewing all articles
Browse latest Browse all 1640

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>