topcpu

scripts>topcpu

 

ttitle off
btitle off

set timing off
set feedback off
set heading on
col name format a30
col username format a15
col osuser format a15
col machine format a12
set lines 132
set pages 1000

break on sid skip 1

select * from (
select a.sid
, c.username
, c.osuser
, c.machine
, b.name
, a.value
from v$sesstat a
, v$statname b
, v$session c
where a.STATISTIC# = b.STATISTIC#
and a.sid = c.sid
and b.name like ‘%CPU%’
order by a.value desc)
where rownum < 11
/

set heading off
set timing on

Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s