Well that shows my sqlplus background then. The reason that I was able to reply so relatively quickly was that I already had sql scripts for capacity planning that needed just a little adapting. The adaptation was because they originally came from Grid Control reports, but of type Chart from SQL - I hadn't really considered the metric chart type, after all why use the built in facilities when you can write your own query :( On Fri, Sep 3, 2010 at 12:11 PM, John Hallas <John.Hallas@xxxxxxxxxxxxxxxxxx > wrote: > I have taken a different slant on this and demonstrated how to display a > report in Grid that can be run against any database instance to display a > graph of CPU uage or any other metric that is required. > > > > > http://jhdba.wordpress.com/2010/09/03/using-grid-to-display-database-cpu-usage/ > > > > I hope it proves useful > > > > John > > On 2 Sep 2010 16:40, "Rich Jesse" <rjoralist2@xxxxxxxxxxxxxxxxxxxxx> > wrote: > > > That'll give the host cpu and not the db CPU > > > > I suspect that the OP is after something along th... > > You beat me to it, Niall! Although I'm not sure which CPU metric would be > the proverbial "best", so I came up with this one to let the OP decide: > > 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'; > > The extra view and columns I used for performance, although that's probably > debatable... > > And, of course, this is run directly against the Grid Control repository DB > and *not* the target database. (thought it worth mentioning) > > GL! > > Rich > > > ______________________________________________________________________ > Wm Morrison Supermarkets Plc is registered in England with number 358949. > The registered office of the company is situated at Gain Lane, Bradford, > West Yorkshire BD3 7DL. This email and any attachments are intended for the > addressee(s) only and may be confidential. > > If you are not the intended recipient, please inform the sender by replying > to the email that you have received in error and then destroy the email. > If you are not the intended recipient, you must not use, disclose, copy or > rely on the email or its attachments in any way. > > This email does not constitute a contract in writing for the purposes of > the Law of Property (Miscellaneous Provisions) Act 1989. > > Our Standard Terms and Conditions of Purchase, as may be amended from time > to time, apply to any contract that we enter into. The current version of > our Standard Terms and Conditions of Purchase is available at: > http://www.morrisons.co.uk/gscop > > Although we have taken steps to ensure the email and its attachments are > virus-free, we cannot guarantee this or accept any responsibility, > and it is the responsibility of recipients to carry out their own virus > checks. > ______________________________________________________________________ > -- Niall Litchfield Oracle DBA http://www.orawin.info