1,通过定时收发email检测连通性
#/bin/bash
echo "Daily test mail" > state.txt
mail -s Server_State 通过email发送
checkserverstat脚本内容:
#/bin/bash
echo "HZtelecomDNS" > state.txt
ping -c 5 202.101.172.35 >> state.txt
echo "
bJU" >> state.txt
ping -c 5 10.X.X.X >> state.txt
echo "ADSL Gateway" >>state.txt
ping -c 5 X.X.X.X >> state.txt
echo "Server_Outside VPN" >>state.txt
ping -c 5 192.168.2.100 >>state.txt
echo "Server_Outside WAN" >> state.txt
ping -c 5 X.X.X.X >> state.txt
echo "VPN in company" >> state.txt
ping -c 5 192.168.1.4 >>state.txt
echo "L2tp at aaa Libweb" >>state.txt
ping -c 5 X.X.X.X & >>state.txt
mail -s Server_State
阅读(2765) | 评论(0) | 转发(0) |