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 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


Comments are closed