开户防火墙port 137/138/139
1. net script. configure
#vi /usr/local/bin/net
#!/bin/sh
case "$1" in
send)
echo "$3"|smbclient -I "$2" -M `nmblookup -A "$2"|sed -e '1d' -e '3,/*/d'|cut -f2|cut -d' ' -f1`
;;
*)
echo "Usage:net send
exit 1
esac
#chmod +x /usr/local/bin/net
#service smb start
rpm -Uvh samba-3.0.33-3.7.el5.x86_64.rpm
rpm -Uvh samba-client-3.0.33-3.7.el5.x86_64.rpm
rpm -Uvh samba-common-3.0.33-3.7.el5.x86_64.rpm
rpm -Uvh samba-swat-3.0.33-3.7.el5.x86_64.rpm
nmblookup -A "10.109.133.25"
nmblookup -A "10.109.133.25"
service smb status
netbios-ns 137/tcp
netbios-ns 137/upd
netbios name service;
netbios name service
netbios session service
service netbios status
netstat -l
netstat -al
2. cat /u01/run/logicalStby_alert.sql
#!/bin/sh
ORACLE_HOME=/u01/product/oracle; export ORACLE_HOME
ORACLE_SID=delll10; export ORACLE_SID
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
output=`/u01/product/oracle/bin/sqlplus /nolog <
spool /u01/run/checkinfo.txt
select count(*) from v\\$logstdby_process;
spool off;
exit
EOF`
#echo "$output" >> /u01/run/log/checklog.log
value=`cat /u01/run/checkinfo.txt | sed -n '5,2p'`
#echo ${value:0:9}
#tmp=${value:0:9}
#source /home/oracle/.bash_profile
if [ "$value" -eq "0" ] ; then
/usr/local/bin/net send xxx.xxx.32.120 "WSJ Logical Standby Apply Processes have died"
/usr/local/bin/net send xxx.xxx.32.88 "WSJ Logical Standby Apply Processes have died"
/usr/local/bin/net send xxx.xxx.32.71 "WSJ Logical Standby Apply Processes have died"
/usr/local/bin/net send xxx.xxx.32.127 "WSJ Logical Standby Apply Processes have died"
/usr/local/bin/net send xxx.xxx.32.110 "WSJ Logical Standby Apply Processes have died"
/usr/local/bin/net send xxx.xxx.32.119 "WSJ Logical Standby Apply Processes have died"
/usr/local/bin/net send xxx.xxx.32.151 "WSJ Logical Standby Apply Processes have died"
/usr/local/bin/net send xxx.xxx.32.100 "WSJ Logical Standby Apply Processes have died"
/usr/local/bin/net send xxx.xxx.32.97 "WSJ Logical Standby Apply Processes have died"
/usr/local/bin/net send 10.109.133.25 "WSJ Logical Standby Apply Processes have died"
/usr/local/bin/net send xxx.xxx.10.95 "WSJ Logical Standby Apply Processes have died"
# /usr/local/bin/net send 192.168.0.2 "WSJ Logical Standby Apply Processes have died"
#elif [ "$value" -ne "0" ] ; then
#/usr/local/bin/net send 10.109.133.25 "WSJ Logical Standby Apply Processes are normal"
#/usr/local/bin/net send xxx.xxx.32.120 "WSJ Logical Standby Apply Processes are normal"
#/usr/local/bin/net send xxx.xxx.32.127 "WSJ Logical Standby Apply Processes have died"
elif [ "${value:0:9}" = "ORA-01034" ] ; then
/usr/local/bin/net send xxx.xxx.32.120 "WSJ Logical Standby has stopped"
/usr/local/bin/net send xxx.xxx.32.88 "WSJ Logical Standby has stopped"
/usr/local/bin/net send xxx.xxx.32.71 "WSJ Logical Standby has stopped"
/usr/local/bin/net send xxx.xxx.32.127 "WSJ Logical Standby has stopped"
/usr/local/bin/net send xxx.xxx.32.110 "WSJ Logical Standby has stopped"
/usr/local/bin/net send xxx.xxx.32.119 "WSJ Logical Standby has stopped"
/usr/local/bin/net send xxx.xxx.32.151 "WSJ Logical Standby has stopped"
/usr/local/bin/net send xxx.xxx.32.100 "WSJ Logical Standby has stopped"
/usr/local/bin/net send xxx.xxx.32.97 "WSJ Logical Standby has stopped"
/usr/local/bin/net send 10.109.133.25 "WSJ Logical Standby has stopped"
/usr/local/bin/net send xxx.xxx.10.95 "WSJ Logical Standby has stopped"
fi
3. 定制任务(crontab -u oracle -e)
*/2 * * * * sh /u01/run/logicalStby_alert.sql 1>/u01/run/log/logicalStby_alert.log 2>/u01/run/log/logicalStby_alert.bad
4. 开户客户端 message 服务
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/25198367/viewspace-696264/ ,如需转载,请注明出处,否则将追究法律责任。