You are on page 1of 4

Using Grid to display database CPU usage Oracle DBA A lifelong ...

1 de 4

https://jhdba.wordpress.com/2010/09/03/using-grid-to-display-databas...

Using Grid to display database CPU usage


Posted by John Hallas on September 3, 2010
There was a recent post on the Oracle -L list asking about using Grid Control to report on a
particular databases cpu usage during a certain period of time. A number of answers came in
showing the sql queries that would answer the question but I saw the question being how can we
display the CPU usage in Grid or indeed how can we produce a customised metric report on any
database in Grid
However for those who are interested in the recommended scripted methods then the the answers
that were of most use in my view were from Karl Arao pointing to a script he has wri en and Rich
Jesse produced the following code
SELECT
mmd.*
FROM
sysman.mgmt$metric_daily mmd
JOIN
sysman.mgmt$target mt
ON mmd.target_name = mt.target_name
AND mmd.target_type = mt.target_type
AND mmd.target_guid = mt.target_guid
WHERE
mmd.metric_column like '%cpu%'
AND mt.target_name = :DB_NAME
AND mt.target_type = 'oracle_database';
My method was to create a report that could be used to report on any instance and this is how I did
it.
On OEM select create report and give it a title, category and sub-category. This is how where it will
be located in the reports tab. Select target type of Database Instance and select a time period, in
my case the last 24 hours.

27/09/2015 11:57

Using Grid to display database CPU usage Oracle DBA A lifelong ...

2 de 4

https://jhdba.wordpress.com/2010/09/03/using-grid-to-display-databas...

Now add 2 new elements as I am going to produce a report with two metric graphs in. Edit the set
parameters tab

Then ensure that the appropriate metrics are selected by choosing the target type Database
Instance but again inherit target. Select whichever metric you are interested in and then repeat the
process for the second required graph.

27/09/2015 11:57

Using Grid to display database CPU usage Oracle DBA A lifelong ...

3 de 4

https://jhdba.wordpress.com/2010/09/03/using-grid-to-display-databas...

Now all you need to do is to look at the preview, enter a SID and hey presto

Finally our end reports looks like this all we need to do s run the report and select the instance
name

27/09/2015 11:57

Using Grid to display database CPU usage Oracle DBA A lifelong ...

4 de 4

https://jhdba.wordpress.com/2010/09/03/using-grid-to-display-databas...

I hope that has proved useful and demonstrated how easy it is to run a customised report which
can be run against any desired instance

This entry was posted on September 3, 2010 at 11:05 am and is led under Grid control and agents,
Oracle, scripts. Tagged: DBA metrics, Grid report, OEM report. You can follow any responses to
this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

One Response to Using Grid to display database CPU usage

1.

Best Oracle Peformance Tools? said

January 13, 2011 at 6:24 pm


[] nice links from Karl Arao: h p://www.pythian.com/documents
/ExtendingOracleEnterpriseManager10g.pdf h ps://jhdba.wordpress.com/2010/09/03/usinggrid-to-display-database-cpu-usage/ h ps://jhdba.wordpress.com/2010/06/21/producing-a-gridreport/ h p://oracleobserver.com/?q=node/23 []
Reply

27/09/2015 11:57

You might also like