[Oracle Script] check File I/O

tolilong發表於2017-08-06
select dbf.tablespace_name,dbf.file_name, gvf.PHYRDS,  gvf.PHYWRTS, round(gvf.phyrds / (gvf.PHYRDS + gvf.PHYWRTS),4)*100  || ' / '||  (1-round(gvf.phyrds / (gvf.PHYRDS + gvf.PHYWRTS),4))*100 "Phyrd/phywt Ratio"  ,
       round((gvf.PHYRDS + gvf.PHYWRTS) / (select sum(PHYRDS + PHYWRTS) from GV$FILESTAT),4)*100 "IO Ratio/Total",
       gvf.PHYBLKRD, gvf.PHYBLKWRT, round(gvf.PHYBLKRD / (gvf.PHYBLKRD + gvf.PHYBLKWRT),4)*100  || ' / '||  (1-round(gvf.PHYBLKRD / (gvf.PHYBLKRD + gvf.PHYBLKWRT),4))*100 "Phyblkrd/Phyblkwt Ratio"  ,
       round((gvf.PHYBLKRD + gvf.PHYBLKWRT) / (select sum(PHYBLKRD + PHYBLKWRT) from GV$FILESTAT),4)*100 "IO Ratio/Total(Block)",
       trunc(gvf.PHYBLKRD/gvf.PHYRDS) "Blocks per read" , trunc(gvf.PHYBLKWRT/gvf.PHYWRTS) "Blocks per write"
  from GV$FILESTAT gvf,dba_data_files dbf
 where gvf.file#=dbf.file_id and gvf.inst_id = USERENV('Instance')

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24237320/viewspace-2143140/,如需轉載,請註明出處,否則將追究法律責任。

相關文章