Posts

Showing posts with the label ASM

Shell Script To Monitor Asm Diskgroup Usage

Write a shell script, which will trigger a mail alert, if the utilization of the asm diskgroup reached 90 percent. export ORACLE_HOME = / oracle / app / oracle / product / 12.1.0.2 / dbhome_1 export ORACLE_SID = PRODDB1 export PATH = $ ORACLE_HOME / bin : $ PATH logfile = / export / home / oracle / asm_dg . log sqlplus - s "/as sysdba" > / dev / null << EOF spool $ logfile SET LINESIZE 150 SET PAGESIZE 9999 SET VERIFY off COLUMN group_name FORMAT a25 HEAD 'DISKGROUP_NAME' COLUMN state FORMAT a11 HEAD 'STATE' COLUMN type FORMAT a6 HEAD 'TYPE' COLUMN total_mb FORMAT 999 , 999 , 999 HEAD 'TOTAL SIZE(GB)' COLUMN free_mb FORMAT 999 , 999 , 999 HEAD 'FREE SIZE (GB)' COLUMN used_mb FORMAT 999 , 999 , 999 HEAD 'USED SIZE (GB)' COLUMN pct_used FORMAT 999.99 HEAD 'PERCENTAGE USED'   SELECT distinct name group _ name , state state , type type , ...