Tuesday, May 5, 2015

Environment Details

Create One .sh file and Paste the contents , try exeuting the .sh file in O/S Mode and it will give exact Environment details




#!/bin/ksh

################################################################################
# Variables
################################################################################
GRID_HOME=$CRS_HOME
ASM_ALERT_LOG=/cs/oracle/diag/asm/+asm

################################################################################
# Get information for asm disk and ask disk path from asm
################################################################################
lun_list() {
sqlplus -s / as sysdba << _SQL_
set pagesize 0 newpage 0 feedback off linesize 132 echo on
col dbname format a10
col name format a22
col path format a45
select substr(name,1,instr(name,'_')-1) as dbname,
       name as name,
       path as path
from   v\$asm_disk
where name is not null
and   name not like 'OCR%'
order by 1;
_SQL_
}
################################################################################
# Derive LUN/ASMDISK and EMC device name information
################################################################################
each_lun=$(lun_list)
echo "${each_lun}" | while read DBNAME NAME ASMLUN
do
lun_dev=`echo $ASMLUN | awk '{ print substr($ASMLUN,20,9) }'`
dev_name=`ls -l $ASMLUN | awk '{print $11}'`
wwwid=`grep $lun_dev /etc/vx/disk.info | awk '{print $1}'`
echo $DBNAME $NAME $ASMLUN $dev_name $wwwid
done


COUNTER=0

for each_node in `olsnodes | sort`; do
  echo $each_node
  COUNTER=`expr $COUNTER + 1`
  ssh $each_node ls -l $GRID_HOME/log/$each_node/alert*
  ssh $each_node ls -l $GRID_HOME/log/$each_node/crsd/*.log
  ssh $each_node ls -l $ASM_ALERT_LOG/+ASM${COUNTER}/trace/*.log
done

No comments:

Post a Comment