SCRIPTS - EXADATA DATABASE MACHINE

Área de scripts destinados à administração, monitoramento e gerenciamento do Exadata e seus componentes .

grep -i MACHINETYPES /opt/oracle.SupportTools/onecommand/databasemachine.xml
dcli -l root -g all_hosts imageinfo --image-version
dcli -l root -g all_hosts imageinfo --image-status
dcli -l root -g all_hosts imageinfo --kernel-version
dcli -l root -g cell_group imageinfo --cell-version
dcli -l root -g cell_group imageinfo --cell-rpm-version
dcli -l root -g all_hosts '/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -a0 | grep BatteryType; /opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -a0 | grep -i temper'
dcli -l root -g all_hosts '/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuCapacityInfo -a0 | grep "Full Charge" '
dcli -l root -g all_hosts '/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuStatus -a0 | grep "Max Error"'
dcli -g all_hosts -l root ipmitool sensor list | grep degree | grep T_AMB
dcli -g all_hosts -l root 'ipmitool sunoem cli "show /SYS/T_AMB" | grep value'
dcli -l root -g all_hosts '/usr/bin/ipmitool  sunoem led get all '
dcli -l root -g cell_group " cellcli -e  LIST CELL ATTRIBUTES name,cellNumber,status,fanStatus,powerStatus,temperatureStatus,cellsrvStatus,msStatus,rsStatus,releaseVersion,releaseTrackingBug"
-- 11.2.3.2.0 em diante
dcli -l root -g cell_group " cellcli -e  LIST CELL ATTRIBUTES name,cellNumber,status,flashCacheMode,fanStatus,powerStatus,temperatureStatus,cellsrvStatus,msStatus,rsStatus,releaseVersion,releaseTrackingBug"
-- Physical HardDisks
dcli -l root -g cell_group " cellcli -e \"LIST PHYSICALDISK ATTRIBUTES name,status,diskType,physicalSize,physicalRPM,physicalInsertTime,errorcount,errHardReadCount,errHardWriteCount,errMediaCount,errOtherCount,errSeekCount,lastFailureReason where disktype=harddisk AND status != 'normal'  \" "
-- Physical HardDisks LUNs
dcli -l root -g cell_group " cellcli -e \"LIST LUN ATTRIBUTES name,status,diskType,deviceName,raidLevel,isSystemLun,lunSize,physicalDrives,lunWriteCacheMode,errorCount where disktype=harddisk AND status != 'normal' \" "
dcli -l root -g cell_group " cellcli -e \"LIST PHYSICALDISK ATTRIBUTES name,status,diskType,physicalSize,errorcount,physicalInsertTime,lastFailureReason where disktype=flashdisk AND status != 'normal' \" "
dcli -l root -g cell_group " cellcli -e \"LIST LUN ATTRIBUTES name,status,diskType,deviceName,raidLevel,isSystemLun,lunSize,physicalDrives,lunWriteCacheMode,errorCount where disktype=flashdisk AND status != 'normal' \" "
dcli -l root -g cell_group " cellcli -e \"LIST LUN ATTRIBUTES name,status,diskType,deviceName,raidLevel,isSystemLun,lunSize,physicalDrives,lunWriteCacheMode,errorCount where disktype=flashdisk and physicalDrives='' \" "
dcli -g /root/cell_group -l root "cellcli -e 'list flashcache detail' | grep effect" >/tmp/log1
dcli -g /root/cell_group -l root "cellcli -e 'list metriccurrent fc_by_dirty,fc_by_used,fc_by_allocated'" >/tmp/log2

date;
printf '%-20s'  "Host" "Cache size" "Allocated" "Used" "Dirty" ;printf '\n'
echo "--------------------------------------------------------------------------------------"

for i in `cat /tmp/log1 | awk '{ print $1} '`
do

HOST=$i
CACHE=`cat /tmp/log1 | grep $i | awk '{ print $3}'`
ALLOCATED=`cat /tmp/log2 | grep $i | grep FC_BY_ALLOCATED | awk '{ print $4}'`
USED=`cat /tmp/log2 | grep $i | grep FC_BY_USED | awk '{ print $4}'`
DIRTY=`cat /tmp/log2 | grep $i | grep FC_BY_DIRTY | awk '{ print $4}'`

printf '%-20s' $HOST $CACHE $ALLOCATED $USED $DIRTY; printf '\n'
done

rm /tmp/log1
rm /tmp/log2
dcli -l root -g cell_group " cellcli -e 'LIST flashcache attributes name,status,size,creationTime,degradedCelldisks,effectiveCacheSize  ' "
dcli -l root -g cell_group " cellcli -e 'LIST flashlog attributes name,status,size,creationTime,degradedCelldisks,effectiveSize,efficiency ' "


Caso você queira compartilhar algum script que não está na lista, entre em contato pelo e-mail anderson.graf87@gmail.com ou deixe um comentário.

0 comentários:

Postar um comentário

Página inicial

Translate

# ACE Program

#Oracle

#Oracle
Disclaimer: The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

#Blog reconhecido

#ARTICULISTA

Marcadores

Postagens populares