OraPub System Monitor (OSM) Toolkit
Get Complete OSM Toolkit (free)

ashclp.sql
ashclpct.sql
ashp.sql
ashpctcpu.sql
ashpcte.sql
ashpctecl.sql
ashpctes.sql
ashpcts.sql
ashrt.sql
ashrt_old.sql
ashsp.sql
ashspct.sql
ashsqlcl.sql
ashsqle.sql
ashsqlpctcl.sql
ashsqlpctcpu.sql
ashsqlpcte.sql
ashsqlpcts.sql
ashsqlpctt.sql
ashsqls.sql
avgexplore.sql
bc.sql
bc7.sql
bcmap.sql
bcmap7.sql
bcobjfb.sql
chr.sql
clone.sql
cr_rtsp.sql
cu.sql
cycledb6
cycledb9
dboc.sql
delete.me
dev_list.txt
dfio.sql
dfl.sql
diag.sql
ds.sql
ds7.sql
dsn.sql
eval1.sql
event_type.sql
event_type_nc.sql
fgidx.sql
fgtbl.sql
hashchk.sql
idx.sql
iosum.sql
iosum9.sql
iosum9x.sql
iosumx.sql
ip.sql
ipcbc.sql
ipx.sql
irtviews.sql
istat.sql
latch.sql
latch8.sql
latch_old.sql
latchchild.sql
latchclass.sql
latchx.sql
lc.sql
lock.sql
loghist8.sql
lruno.sql
mkodo.sql
mkodo_ouch.sql
mts.sql
mysess.sql
objfb.sql
objloc.sql
ogbigld.sql
ogcrobj.sql
ogdoit.sql
ogobjlst.sql
ogobjset.sql
oracpu.sql
oracputext.sql
oracpux.sql
oracpux1.sql
oracpux2.sql
oscpux.sql
oscpux1.sql
oscpux10.sql
oscpux2.sql
oscpux210.sql
osmclear.sql
osmi.sql
osmprep.sql
osmtitle.sql
osmtitlel.sql
osmtitlell.sql
osmtitlem.sql
osmtitles.sql
rbs.sql
rdohist.sql
readme.txt
rlog.sql
rtc.sql
rtcx.sql
rtio.sql
rtow.sql
rtpctx.sql
rtsess.sql
rtsess9.sql
rtsessx.sql
rtsum.sql
rtsys.sql
rtsysx.sql
rtsysx8.sql
sessinfo.sql
sessinfo9.sql
sesstat.sql
sga.sql
simsql1.sql
simsql2.sql
snap_stats.sql
spspinfo.sql
sqls1.sql
sqls18.sql
sqls19.sql
sqls2.sql
sqls3.sql
sqls4.sql
stu.sql
supers.sql
swenq.sql
swenqc.sql
swenqnew.sql
swenqx.sql
swhist.sql
swhist.sql.sav
swhistx.sql
swhistx.sql.sav
swpct.sql
swpctidle.sql
swpctx.sql
swpctxidle.sql
swsessid.sql
swsid.sql
swsw.sql
swswc.sql
swswp.sql
swsys.sql
sysstat.sql
tbfsum.sql
tcsizing.sql
tcstats.sql
test.sql
timechk.sql
topcpu
topdml.sql
tp.sql
tp9.sql
tsmap.sql
tss.sql
undo.sql
users.sql
------------------------------------------------------------
-- file		swhistx.sql
-- desc		Session wait DELTA statitics histogram (‹event name›)
-- author	Craig A. Shallahamer, craig@orapub.com
-- orig		03-April-07
-- lst upt	21-Dec-2011
-- copyright	(c)2007,2011 OraPub, Inc.
------------------------------------------------------------

def ev_name=&1

prompt Remember: This report must be run twice so both
prompt the initial and final values are available.

set echo off
set feedback off
set heading off
set verify off

col val2 new_val delta_count noprint

select	sum(t1.wait_count-t0.wait_count) val2
from	v$event_histogram t1,
		event_histogram_snap t0
where	t1.event like '%&ev_name%'
  and	t1.event = t0.event
  and	t1.wait_time_milli = t0.wait_time_milli
/

set echo off
set feedback off
set heading on
set verify off

def osm_prog	= 'swhistx.sql'
def osm_title	= 'Wait Event Activity Delta Histogram (event:&ev_name)'

start osmtitle

col event		format a35			heading "Wait Event" trunc
col wtm			format 99999		heading "ms Wait ‹="
col delta_count	format 9999999990	heading "Delta Occurs"
col pct_occurs		format 990.00		heading "Occurs %"
col pct_rt		format 990.00		heading "Running|Occurs %"

select	t1.event,
		t1.wait_time_milli wtm,
		t1.wait_count-t0.wait_count delta_count,
		100*(t1.wait_count-t0.wait_count)/&delta_count pct_occurs,
		100*(sum(t1.wait_count-t0.wait_count)
			over (order by t1.event,t1.wait_time_milli))/&delta_count pct_rt
from	v$event_histogram t1,
	event_histogram_snap t0
where	t1.event like '%&ev_name%'
  and	t1.event = t0.event
  and	t1.wait_time_milli = t0.wait_time_milli
order by 1,2
/

truncate table event_histogram_snap
/
insert /*+ APPEND */ into event_histogram_snap nologging
select * 
from   v$event_histogram b
where  b.event not in ( select a.event
			from   o$event_type a
			where  a.type in ('bogus','idle')
		       )
/
commit;

start osmclear



Know what's important before it's too late!



OraPub's
Performance Training

is like no other...




More Class Pics...
Get student testimonials!



Craig Shallahamer's Blog