ASM Disk Information (vasmdsk.sql)
What This Script Does
Section titled “What This Script Does”This script provides detailed analysis of ASM disk performance and capacity, showing I/O statistics, service times, and space utilization for each disk in all ASM disk groups. Essential for monitoring ASM disk performance and identifying I/O bottlenecks.
The Script
Section titled “The Script”set lines 155col name format a17col group_number format 999 heading 'GRP|NBR'col path format a40col reads format 999999999col writes format 999999999col rd_avg forma 9999.00 head 'READ|SVC|TIME|(ms)'col wr_avg forma 9999.00 head 'WRITE|SVC|TIME|(ms)'col byte_read format 999999999 head 'Bytes|per|Read'col byte_write format 999999999 head 'Bytes|per|Write'col total_mb format 9,999,999 head 'TOTAL MB'col free_mb format 9,999,999 head 'FREE MB'
break on report skip 1 on group_number skip 1
compute sum of total_mb free_mb on report group_number
select group_number, name, path, -- create_date, -- mount_date, reads, -- read_time, read_time/decode(reads, 0, 1, reads)*1000 rd_avg, bytes_read/decode(reads,0,1, reads) byte_read, writes, write_time/decode(writes, 0, 1, writes)*1000 wr_avg, bytes_written/decode(writes,0,1, writes) byte_write , total_mb, free_mb from v$asm_disk order by group_number, name, path/
Parameters
Section titled “Parameters”The script prompts for:
- None - this script requires no parameters
-- Basic usage@vasmdsk.sql
Sample Output
Section titled “Sample Output”GRP READ Bytes WRITE BytesNBR NAME PATH READS SVC per WRITES SVC per TOTAL MB FREE MB TIME Read TIME Write (ms) (ms)--- ---------------- ---------------------------------------- ----- ----- --------- ----- ----- --------- --------- --------- 1 DATA_0000 /dev/asm-disk1 12345 2.15 8192 5678 1.85 8192 10,240 5,120 DATA_0001 /dev/asm-disk2 12890 2.22 8192 5234 1.92 8192 10,240 5,340 DATA_0002 /dev/asm-disk3 11567 2.08 8192 6123 1.78 8192 10,240 4,890--- ---------------- ---------------------------------------- ----- ----- --------- ----- ----- --------- --------- ---------sum 30,720 15,350
2 FRA_0000 /dev/asm-disk4 8765 3.45 32768 2345 2.34 32768 20,480 18,200 FRA_0001 /dev/asm-disk5 9123 3.52 32768 2678 2.41 32768 20,480 17,890--- ---------------- ---------------------------------------- ----- ----- --------- ----- ----- --------- --------- ---------sum 40,960 36,090
3 REDO_0000 /dev/asm-disk6 45678 1.12 512 34567 0.98 512 2,048 1,024 REDO_0001 /dev/asm-disk7 46234 1.08 512 35123 0.94 512 2,048 1,156--- ---------------- ---------------------------------------- ----- ----- --------- ----- ----- --------- --------- ---------sum 4,096 2,180 --------- ---------sum 75,776 53,620
Key Metrics
Section titled “Key Metrics”- Service Times: Average read and write service times in milliseconds
- I/O Counts: Total read and write operations per disk
- Transfer Sizes: Average bytes per read and write operation
- Capacity: Total and free space in MB for each disk
- Performance: Identifies slow disks or uneven I/O distribution