Datacentre Support Reference Guides

Visit our online shop for ALL your parts, components, laptops, electronics and gadgets
 

Oracle: ID'ing I/O numbers and weights

 

 
 

The following script, taken from Oracle 8i Handbook (page 113) computes the I/O rates as well as their ratios and displays them to the screen. The I/O numbers listed are computed from the time the instance started. If you have anything like my little datase on this Linux box, the number are going to be real low!



set pagesize 60 linesize 80 newpage 0 feedback off

ttitle skip center "Database File IO Weights" skip center -

"ordered by Drive" skip 2

column Total_IO format 999999999

column Weight format 999.99

column File_Name format a40

break on Drive skip 2

compute sum of Weight on Drive



select 

   substr(df.name,1,5) drive,

   df.name file_name,

   fs.phyblkrd+fs.phyblkwrt total_io,

   100*(fs.phyblkrd+fs.phyblkwrt)/maxio weight

from v$filestat fs, v$datafile df,

   (select max(phyblkrd+phyblkwrt) maxio

       from v$filestat)

where df.file# = fs.file#

order by drive, weight desc;