Bo's Oracle Station

查看: 1685|回复: 0

课程第21次:2020-03-20星期五

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2020-3-20 19:13:45 | 显示全部楼层 |阅读模式
1.  TEAM0 的WATCHER的配置
1.1
  1. {
  2.     "device": "team0",
  3.     "mcast_rejoin": {
  4.         "count": 1
  5.     },
  6.     "notify_peers": {
  7.         "count": 1
  8.     },
  9.     "ports": {
  10.         "ens38": {
  11.             "link_watch": {
  12.                 "name": "arp_ping",
  13.                 "interval": 10,
  14.                 "missed_max": 10,
  15.                 "source_host": "172.31.118.105",
  16.                 "target_host": "172.31.118.104"
  17.             }
  18.         },
  19.         "ens39": {
  20.             "link_watch": {
  21.                 "name": "arp_ping",
  22.                 "interval": 10,
  23.                 "missed_max": 10,
  24.                 "source_host": "172.31.118.105",
  25.                 "target_host": "172.31.118.104"
  26.             }
  27.         }
  28.     },
  29.     "runner": {
  30.         "name": "activebackup"
  31.     }
  32. }
复制代码


2. RE 用在动态shell脚本中:11/conclusion.list:
  1. 192.168.0.103
  2. 192.168.0.104
  3. 192.168.0.105
复制代码
  1. #!/bin/sh
  2. sub_1() {
  3. ping -q -n -c 10 -W 1 -i 0.01 -w 1 192.168.0.$1 >/dev/null  2>&1
  4. if [ $? -eq 0 ]
  5. then
  6.   v_nmap=$(nmap -P0  -p 22  192.168.0.$1 | grep open | tr -d '[:blank:]')
  7.   if [ ! -z $v_nmap ]
  8.   then
  9.    echo 192.168.0.$1 >> 11/conclusion.online
  10.   fi
  11. fi
  12. }


  13. rm -f  11/conclusion.online
  14. for i in `seq 1 254`
  15. do
  16. sub_1 $i &
  17. done
  18. wait

  19. echo "OK:"
  20. sed 's/$/$/g' 11/conclusion.online > 11/conclusion.online2
  21. grep -f 11/conclusion.online2 11/conclusion.list


  22. sed 's/$/$/g' 11/conclusion.list > 11/conclusion.list2
  23. echo "STANGE: "
  24. grep -v -f  11/conclusion.list2 11/conclusion.online

  25. echo "NOTONLINE:"
  26. grep -v -f 11/conclusion.online2 11/conclusion.list

复制代码

3. CRS_STAT:
  1. [root@server4 ~]# crs_stat -t
  2. Name           Type           Target    State     Host        
  3. ------------------------------------------------------------
  4. ora.DATA.dg    ora....up.type ONLINE    ONLINE    server4     
  5. ora....ER.lsnr ora....er.type ONLINE    ONLINE    server4     
  6. ora....N1.lsnr ora....er.type ONLINE    ONLINE    server5     
  7. ora....N2.lsnr ora....er.type ONLINE    ONLINE    server5     
  8. ora....N3.lsnr ora....er.type ONLINE    ONLINE    server4     
  9. ora.MGMTLSNR   ora....nr.type ONLINE    ONLINE    server4     
  10. ora.asm        ora.asm.type   ONLINE    ONLINE    server4     
  11. ora.cvu        ora.cvu.type   ONLINE    ONLINE    server4     
  12. ora.mgmtdb     ora....db.type ONLINE    ONLINE    server4     
  13. ora....network ora....rk.type ONLINE    ONLINE    server4     
  14. ora.oc4j       ora.oc4j.type  ONLINE    ONLINE    server5     
  15. ora.ons        ora.ons.type   ONLINE    ONLINE    server4     
  16. ora.scan1.vip  ora....ip.type ONLINE    ONLINE    server5     
  17. ora.scan2.vip  ora....ip.type ONLINE    ONLINE    server5     
  18. ora.scan3.vip  ora....ip.type ONLINE    ONLINE    server4     
  19. ora....SM1.asm application    ONLINE    ONLINE    server4     
  20. ora....R4.lsnr application    ONLINE    ONLINE    server4     
  21. ora....er4.ons application    ONLINE    ONLINE    server4     
  22. ora....er4.vip ora....t1.type ONLINE    ONLINE    server4     
  23. ora....SM2.asm application    ONLINE    ONLINE    server5     
  24. ora....R5.lsnr application    ONLINE    ONLINE    server5     
  25. ora....er5.ons application    ONLINE    ONLINE    server5     
  26. ora....er5.vip ora....t1.type ONLINE    ONLINE    server5     
复制代码





回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-5-9 12:53 , Processed in 0.032528 second(s), 24 queries .

快速回复 返回顶部 返回列表