Chinaunix首页 | 论坛 | 博客
  • 博客访问: 598486
  • 博文数量: 248
  • 博客积分: 52
  • 博客等级: 民兵
  • 技术积分: 1028
  • 用 户 组: 普通用户
  • 注册时间: 2012-12-23 12:05
文章分类

全部博文(248)

文章存档

2016年(7)

2013年(241)

分类: 服务器与存储

2013-02-04 06:41:19

原文地址:linux检查网络状态脚本 作者:wfeng

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
阅读(1502) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~