RE: Re: wierd runstats_pkg report

  • From: "Bobak, Mark" <Mark.Bobak@xxxxxxxxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 24 Mar 2004 01:50:34 -0500

Not sure what you mean by "how to use".  It's cumulative data, up to the 
current point in time.

So, look at V$SESSTAT for any given SID, and take a snapshot.  Then, monitor 
the session doing it's work, and when it's done, take another snapshot.  
Subtract the values from the first snap from their corresponding values in the 
second snap, and you'll have statistics info for the duration of the window.

It's very similar to what StatsPack does and what Tom Kyte's RunStats package 
does.  

For CPU time, you just need statistic #12, CPU used by this session.  (Note 
that unlike latch numbers, the statistics numbers are invariant across Oracle 
versions, so, I know that 12 is CPU used by this session, regardless of what 
version you're on.)  Only V$SYSSTAT has the NAME column built in, so if you're 
using V$SESSTAT or V$MYSTAT, you'll have to join to V$STATNAME.

Hope that helps,

-Mark

PS  It's 'Cary Millsap', not 'Carrie Milsap'.

-----Original Message-----
From:   Ryan [mailto:ryan.gaffuri@xxxxxxx]
Sent:   Tue 3/23/2004 5:01 PM
To:     oracle-l@xxxxxxxxxxxxx
Cc:     
Subject:        Re: Re: wierd runstats_pkg report
can someone point me to some good articles(other than the docs) on how to
use the v$stat.. etc... views and such? Have any of you written any? Same
with stuff on v$thread.

The docs arent very clear. I've got Carrie Milsap's tuning book, but havent
had time to read it cover to cover. Alot of that is in there.
----- Original Message ----- 
From: "Jamadagni, Rajendra" <Rajendra.Jamadagni@xxxxxxxx>
To: <oracle-l@xxxxxxxxxxxxx>
Sent: Tuesday, March 23, 2004 3:42 PM
Subject: RE: Re: wierd runstats_pkg report


> v$mystat ... statistic is 'CPU used by this session'
>
> Raj
> --------------------------------------------------------------------------
------
> Rajendra dot Jamadagni at nospamespn dot com
> All Views expressed in this email are strictly personal.
> select standard_disclaimer from company_requirements;
> QOTD: Any clod can have facts, having an opinion is an art !
>
>
> -----Original Message-----
> From: oracle-l-bounce@xxxxxxxxxxxxx
> [mailto:oracle-l-bounce@xxxxxxxxxxxxx]On Behalf Of ryan.gaffuri@xxxxxxx
> Sent: Tuesday, March 23, 2004 2:46 PM
> To: oracle-l@xxxxxxxxxxxxx
> Subject: Re: Re: wierd runstats_pkg report
>
>
> which view do i get cpu usage from?
> ----------------------------------------------------------------
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> ----------------------------------------------------------------
> To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
> put 'unsubscribe' in the subject line.
> --
> Archives are at //www.freelists.org/archives/oracle-l/
> FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
> -----------------------------------------------------------------
>

----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------


Other related posts: