Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: how do I calculate the Oracle's usage

RE: how do I calculate the Oracle's usage

From: Deshpande, Kirti <kirti.deshpande_at_verizon.com>
Date: Mon, 25 Nov 2002 20:38:43 -0800
Message-ID: <F001.0050B9C7.20021125203843@fatcity.com>


Try Statspack ...

-----Original Message-----
Sent: Monday, November 25, 2002 5:29 PM
To: Multiple recipients of list ORACLE-L

Even though the name of the statistic is "CPU used by this session," the v$sysstat view contains aggregated data of the statistics of all sessions that have ever logged into your instance since it started. For consistency, they use the same statistic names as are used by the session-level statistics from v$sesstat, which is being aggregated in v$sysstat. The full list of statistics is in v$statname. So if you wanted your own statistics, you would have a query like this:

select value from v$session s, v$sesstat ss, v$statname sn where s.audsid = userenv('sessionid') and s.sid = ss.sid and ss.statistic# = sn.statistic# and sn.name = 'CPU used by this session';

To get the total for everyone ever logged in up to now, just query v$sysstat.

--
Jeremiah Wilton
http://www.speakeasy.net/~jwilton

On Mon, 25 Nov 2002, Gurelei wrote:


> Wouldn't this only give me the statistics for
> MY current session? I'm looking for the data on
> all the running sessions.
>
> --- Jeremiah Wilton <jwilton_at_speakeasy.net> wrote:
> > How about you collect the following value from each
> > instance on the
> > host, wait a few hours, then collect the numbers
> > again? You can then
> > subtract the earlier values from the later values,
> > and you'll have a
> > good idea which instances are using more CPU
> > relative to the others.
> >
> > SQL> select value from v$sysstat where name = 'CPU
> > used by this session';
> >
> > On Mon, 25 Nov 2002, Gurelei wrote:
> >
> > > I'm trying to figure out how much of the srever's
> > resources
> > > (CPU-wise) a database and the application running
> > against it is
> > > taking. There are several databases on that server
> > and I'm only
> > > interested in one so vmstat won't really help that
> > much. Besides
> > > just running ps -ef | grep INSTANCE is there any
> > other way for me to
> > > get a feeling of the load that puts on the CPU my
> > database?
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Deshpande, Kirti INET: kirti.deshpande_at_verizon.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Received on Mon Nov 25 2002 - 22:38:43 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US