-- asm.sql: ASM disk group usage, counting what's really usable after mirroring -- Copyright (c) HASHJOIN. MIT License (https://hashjoin.com/kb/license/) -- https://hashjoin.com/kb/oracle/asm-diskgroup-usage/ -- -- Usage: @asm.sql -- -- gv$asm_operation (rebalances in flight) only returns rows when run on the ASM instance. set trims on set pages 90 set lines 132 prompt Rebalance and resync operations in flight (ASM instance only) select * from gv$asm_operation; col name format a25 break on report compute sum of total_mb on report ttit "ASM Diskgroup Usage" select distinct name, total_mb, least(free_mb, usable_file_mb) free_mb, round(100 - (least(free_mb, usable_file_mb)*100/decode(total_mb,0,1,total_mb)),1) pct_used from gv$asm_diskgroup order by 4 desc; ttit off