Here’s a simple script to see how much space that you have at the disk and disk group level. This script should work on all the operating systems but only tested on Linux. The only portion that you will have to change is the ‘ps -ef’ line.
export DB=$(ps -ef |grep +ASM |grep -i pmon |awk {'print $8'} |sed -e 's/asm_pmon_//g')
export ORACLE_SID=${DB}
export ORAENV_ASK=NO
. oraenv
sqlplus -s / as sysasm <<!!
col name for a15
col path for a20
set lines 122 pages 66
col AU for 9 hea 'AU|MB'
col state for a12
col compatibility for a10 hea 'ASM|Compat'
col database_compatibility for a10 hea 'Database|Compat'
col pct_Free for 99.99 head 'Pct|Free'
col block_size for 99,999 head 'Block|Size'
col Total_GB for 999,999.99 head 'Total|GB'
col Free_GB for 999,999.99 head 'Free|GB'
col pct_free for 999 hea 'Pct|Free'
select name, path, total_mb, free_mb,
round(free_mb/total_mb*100,2) pct_Free
from v\$asm_disk
where total_mb >1
order by name;
select name, state, round(total_mb/1024,2) Total_GB, round(free_mb/1024,2) Free_GB,
round(free_mb/total_mb*100,2) pct_Free,
allocation_unit_size/1024/1024 AU, compatibility, database_compatibility
from v\$asm_diskgroup
where total_mb > 1;
!!
Posted by Charles Kim, Oracle ACE Director