shell指令碼 監控oracle的執行狀態

2021-06-05 18:04:40 字數 505 閱讀 5654

#!/bin/sh

#author:wdh226

#date:2023年5月26日0:41:05

#監控oa伺服器oracle埠1521是否異常,一旦出現問題,傳送郵件到[email protected]

healoracle()' ` -ne 0 ];then

return $?

else 

return $?fi}

send_oraclemessage()

while true; do

while healoracle; do

echo " oracle服務正常!" `date` >>  /test/oracle_right.txt

sleep 3600

done

echo "oracle服務異常,請檢查!" `date` >>  /test/oracle_error.txt

send_oraclemessage

sleep 3600

done

shell監控指令碼 監控CDN 首頁

注意 請先參考 shell監控指令碼 準備工作,監控指令碼在 rhel5 下測試正常,其它版本的linux 系統請自行測試 監控cdn 首頁 cat chk cdn.sh bin bash script name chk cdn.sh check cdn index.html domain name...

shell指令碼 開發系統監控指令碼

某公司隨著業務的不斷發展,所使用的linux伺服器也越來越多。管理員希望編寫乙個簡單的效能監控指令碼,放到各伺服器中,當監控指標出現異常時傳送告警郵件。編寫名為sysmon.sh的shell監控指令碼 監控內容包括cpu使用率,記憶體使用率,根分割槽的磁碟占有率,百分比只需精確到個位 出現磁碟占有率...

Oracle監控Sql指令碼

spool d 10 10.log prompt 192.168.10.10 wcm03 分析 prompt 分析時間 select sysdate from dual prompt 資料庫例項 select name from v database prompt 檢查資料檔案的狀態記錄狀態不是 o...