asmuse.ksh

#!/usr/bin/ksh
#
# Title :       asmuse.ksh
# Description : Show ASM disk usage for 11g environments.
# Usage :       Configure the ASM SID & ASM Oracle Home before running.
#
# Copyright :   ABCdba.com 2010
#

export ORACLE_SID=<Enter 11g ASM SID here>
export ORACLE_HOME=<Enter full path to 11g ASM Oracle Home here>
export PATH=${PATH}:${ORACLE_HOME}/bin
export LD_LIBRARY_PATH=${ORACLE_HOME}/lib
export LC_ALL=en_GB

echo
echo
echo "  ASM Disk     % Full     Used (MB)       Free (MB)        Total (MB) "
echo "======================================================================"

asmcmd lsdg | \
 nawk -v sq="'" 'BEGIN { getline } {
        printf"  %s     \t %d%% \t %9"sq"d \t %9"sq"d \t %12"sq"d \n",$13,100-100*($8/$7),$7-$8,$8,$7
   }'

echo
echo

© copyright 2001-2014 ABCdba.com | all rights reserved