disktots.sql

--==================================================================
--
-- Title       :   disktots.sql
-- Description :   To display total reads, writes and sum of reads
--                 and writes for a database, grouping totals by
--                 Unix partition.
--
-- Usage/Notes :
--
-- Copyright   :   ABCdba.com 2002
--
--==================================================================
 
CLEAR BREAKS
CLEAR COLUMNS
CLEAR COMPUTES
 
COL disk HEA "Disk Name" FOR a40
COL reads HEA "Reads" FOR 999999999
COL writes HEA "Writes" FOR 999999999
COL total_io HEA "Total io" FOR 999999999
 
SELECT SUBSTR( name, 1, INSTR( name, '/', -1, 1 ) -1  ) disk,
       SUM( phywrts ) writes,
       SUM( phyrds ) reads,
       SUM( phywrts + phyrds ) total_io
FROM v$dbfile df, v$filestat fs
WHERE df.file# = fs.file#
GROUP BY SUBSTR( name, 1, INSTR( name, '/', -1, 1 ) -1  )
ORDER BY total_io DESC, disk
/

© copyright 2001-2014 ABCdba.com | all rights reserved