Tuesday, January 29, 2013
ASM Diskgroup Space Used / Free
SQL:
set linesize 140
col group_number heading 'Diskgroup|Number' format 999
col diskgroup heading 'Name' format a20
col total_mb heading 'Allocated (MB)' format 999,999,999
col free_mb heading 'Available (MB)' format 999,999,999
col tot_used heading 'Used (MB)' format 999,999,999
col pct_used heading '% Used' format 999
col pct_free heading '% Free' format 999
select group_number,
name diskgroup,
total_mb,
free_mb,
total_mb-free_mb tot_used,
pct_used,
pct_free
from (select group_number,name,total_mb,free_mb,
round(((total_mb-nvl(free_mb,0))/decode(total_mb,0,1,total_mb))*100) pct_used,
round((free_mb/total_mb)*100) pct_free
from v$asm_diskgroup
where total_mb >0
order by pct_free
)
/
SAMPLE OUTPUT:
Diskgroup
Number Name Allocated (MB) Available (MB) Used (MB) % Used % Free
--------- --------------- -------------- -------------- ----------- ------ ------
2 DATA2 5,767,234 1,860,008 3,907,226 68 32
1 DATA1 5,767,234 1,996,305 3,770,929 65 35
Labels:
ASM,
Monitoring,
Oracle,
Space
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment