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

Home -> Community -> Usenet -> c.d.o.server -> Re: how much CPU is used by session

Re: how much CPU is used by session

From: Cristian Cudizio <cristian.cudizio_at_yahoo.it>
Date: 27 Apr 2007 01:21:40 -0700
Message-ID: <1177662100.708358.233650@s33g2000prh.googlegroups.com>


On Apr 27, 10:02 am, Andrea <netsecur..._at_tiscali.it> wrote:
> On 26 Apr, 23:46, sybra..._at_hccnet.nl wrote:
>
>
>
> > On Thu, 26 Apr 2007 20:57:55 +0200, Andrea <n..._at_tin.it> wrote:
> > >Hi,
> > >on my 8.1.7 Oracle DB i found my CPU highest then normal, reaching often
> > >50%/60% without any important transaction.
> > >I would like to know if is possible how much CPU is used by particular
> > >session, there is some performance view where i can found CPU usage for each
> > >session?
> > >Or i have to install statspack mandatory?
>
> > >thanks for support.
>
> > >bye
> > >Andrew
>
> > That would be v$sesstat.
> > Nobody should do without statspack, but statspack doesn't track
> > session data.
> > You could set up a before logoff on database trigger copying the
> > results from v$sesstat in a ordinary table.
>
> ok, so with this select i can find CPU session status in really time
> (sid 19 is my session):
>
> SELECT SID,VALUE FROM V$SESSTAT WHERE SID='19' AND STATISTIC# = '12';
>
> correct?
> without any statspack or timed_statistics active?
>
> thanks very much

V$sesstat is an accumulator view, it register statistics from the born of the session so you have take two "snapshots" of the view and take the difference to gather significative results.

Bye
 Cristian Cudizio

http://cristiancudizio.wordpress.com
http://oracledb.wordpress.com/ Received on Fri Apr 27 2007 - 03:21:40 CDT

Original text of this message

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