以下の内容はhttps://htn20190109.hatenablog.com/entry/2025/05/06/080605より取得しました。


クラスタ状態取得シェル

 

 

cat <<-'EOF' > get_cluster_status.sh
#!/bin/bash

HOSTMEI=$1
BEAF=$2


echo "[$(date '+%Y/%m/%d %H:%M:%S')] job start" | tee -a  /tmp/get_cluster_status_$(date '+%Y%m').log

ssh ${HOSTMEI} "sudo su - -c '/u01/app/19.0.0/grid/bin/crsctl stat res -t'" > /tmp/get_cluster_status_${BEAF}.tmp


RET=$?
if [ ${RET} -ne 0 ] ; then
  echo "[$(date '+%Y/%m/%d %H:%M:%S')] job error( ${RET} )" | tee -a  /tmp/get_cluster_status_$(date '+%Y%m').log
  exit 100
fi

echo "[$(date '+%Y/%m/%d %H:%M:%S')] job end" | tee -a  /tmp/get_cluster_status_$(date '+%Y%m').log
exit 0

EOF

 

cat get_cluster_status.sh
chmod +x get_cluster_status.sh


./get_cluster_status.sh mmdb131 before
./get_cluster_status.sh mmdb131 after


cat /tmp/get_cluster_status_$(date '+%Y%m').log

cat /tmp/get_cluster_status_before.tmp
cat /tmp/get_cluster_status_after.tmp

 

 

 

 




以上の内容はhttps://htn20190109.hatenablog.com/entry/2025/05/06/080605より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14