SHIDOU

119 ~/M2/image-installer-bak$ 脚本
sdcm@sdcm:~$ cat ping.sh1
#!/bin/bash
IP=(
172.16.0.200
172.16.0.201
172.16.0.202
172.16.0.203
172.16.0.204
172.16.0.205
172.16.0.210
172.16.0.211
172.16.0.212
172.16.0.213
172.16.0.214
172.16.0.215
172.16.0.216
172.16.0.217
)
echo "Start ping at : "`date +%Y-%m-%d-%H:%M:%S`
for PING in ${IP[*]} ;do
CHECK=`ping -c 1 -w 1 $PING |grep "time="|awk '{print $4}'`
if [ "$CHECK" = "" ];then
echo ${PING}"---""OFFLINE..."`date +%Y-%m-%d-%H:%M:%S`
else
echo ${PING}"---""OK---OK..."`date +%Y-%m-%d-%H:%M:%S`
fi
done
echo "Finished ping at : "`date +%Y-%m-%d-%H:%M:%S`
sdcm@sdcm:~$ ./ping.sh1
Start ping at : 2014-10-30-11:53:03
172.16.0.200---OK---OK...2014-10-30-11:53:03
172.16.0.201---OK---OK...2014-10-30-11:53:03
172.16.0.202---OK---OK...2014-10-30-11:53:03
172.16.0.203---OK---OK...2014-10-30-11:53:03
172.16.0.204---OK---OK...2014-10-30-11:53:03
172.16.0.205---OK---OK...2014-10-30-11:53:03
172.16.0.210---OK---OK...2014-10-30-11:53:03
172.16.0.211---OK---OK...2014-10-30-11:53:03
172.16.0.212---OK---OK...2014-10-30-11:53:03
172.16.0.213---OK---OK...2014-10-30-11:53:03
172.16.0.214---OK---OK...2014-10-30-11:53:03
172.16.0.215---OK---OK...2014-10-30-11:53:03
172.16.0.216---OK---OK...2014-10-30-11:53:03
172.16.0.217---OK---OK...2014-10-30-11:53:03
Finished ping at : 2014-10-30-11:53:03
sdcm@sdcm:~$ ping -c 1 -w 1 172.16.0.200
PING 172.16.0.200 (172.16.0.200) 56(84) bytes of data.
64 bytes from 172.16.0.200: icmp_req=1 ttl=64 time=0.835 ms
--- 172.16.0.200 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.835/0.835/0.835/0.000 ms
sdcm@sdcm:~$ ping -c 1 -w 1 172.16.0.200 |grep time\=
64 bytes from 172.16.0.200: icmp_req=1 ttl=64 time=0.839 ms
arp -an -i br0 |grep -v incom |grep -v 172.16.0. |awk -F "(" '{print $2}'|awk -F ")" '{print $1}'|sort
4、
Found AP:
172.16.0.200 172.16.0.201 172.16.0.202 172.16.0.203 172.16.0.204 172.16.0.205 172.16.0.206 172.16.0.207 172.16.0.210 172.16.0.211 172.16.0.212 172.16.0.213 172.16.0.214 172.16.0.215 172.16.0.216 172.16.0.217
Check AP...ping 3 times
16 AP:
172.16.0.200: time=0.943 ms
172.16.0.200: time=0.821 ms
172.16.0.200: time=0.820 ms
172.16.0.201: time=0.907 ms
172.16.0.201: time=0.815 ms
172.16.0.201: time=0.817 ms
172.16.0.202: time=0.437 ms
172.16.0.202: time=0.373 ms
172.16.0.202: time=0.367 ms
172.16.0.203: time=0.439 ms
172.16.0.203: time=0.366 ms
172.16.0.203: time=0.371 ms
172.16.0.204: time=0.449 ms
172.16.0.204: time=0.475 ms
172.16.0.204: time=0.375 ms
172.16.0.205: time=0.410 ms
172.16.0.205: time=0.297 ms
172.16.0.205: time=0.361 ms
172.16.0.206: time=0.915 ms
172.16.0.206: time=0.792 ms
172.16.0.206: time=0.732 ms
172.16.0.207: time=0.907 ms
172.16.0.207: time=0.832 ms
172.16.0.207: time=0.804 ms
172.16.0.210: time=0.928 ms
172.16.0.210: time=0.842 ms
172.16.0.210: time=0.843 ms
172.16.0.211: time=1.07 ms
172.16.0.211: time=0.974 ms
172.16.0.211: time=0.968 ms
172.16.0.212: time=1.09 ms
172.16.0.212: time=0.998 ms
172.16.0.212: time=1.00 ms
172.16.0.213: time=1.13 ms
172.16.0.213: time=1.00 ms
172.16.0.213: time=1.00 ms
172.16.0.214: time=0.971 ms
172.16.0.214: time=0.883 ms
172.16.0.214: time=0.847 ms
172.16.0.215: time=1.11 ms
172.16.0.215: time=0.980 ms
172.16.0.215: time=0.999 ms
172.16.0.216: time=0.977 ms
172.16.0.216: time=0.860 ms
172.16.0.216: time=0.797 ms
172.16.0.217: time=1.07 ms
172.16.0.217: time=1.06 ms
172.16.0.217: time=1.01 ms
Found client ip:
172.16.2.28 172.16.2.192 172.16.2.203 172.16.3.17 172.16.3.69 172.16.3.87
Check client ip...ping 3 times
6 client ip:
172.16.2.28: time=259 ms
172.16.2.28: time=82.7 ms
172.16.2.28: time=107 ms
ping 172.16.2.192 failed...
172.16.2.203: time=35.4 ms
172.16.2.203: time=48.9 ms
172.16.2.203: time=79.5 ms
172.16.3.17: time=56.2 ms
172.16.3.17: time=73.7 ms
172.16.3.17: time=90.9 ms
172.16.3.69: time=310 ms
172.16.3.69: time=205 ms
172.16.3.69: time=159 ms
172.16.3.87: time=93.1 ms
172.16.3.87: time=110 ms
172.16.3.87: time=31.7 ms
sdcm@sdcm:~$
SHIDOU的更多相关文章
- Bootstrap FileInput 上传 中文 API 整理
Bootstrap FileInput 上传 中文 API 整理 上传插件有很多 但是公司用的就是 Bootstrap FileInput 自己就看了看 会用就行 自己都不知道每个值是干嘛用的就问 ...
- SFC游戏列表(维基百科)
SFC游戏列表 日文名 中文译名 英文版名 发行日期 发行商 スーパーマリオワールド 超级马里奥世界 Super Mario World 1990年11月21日 任天堂 エフゼロ F-Zero F-Z ...
随机推荐
- CentOS下安装Orcale
以前没有安装过,最近安装了.感觉在Liunx安装真的超麻烦.这是技术文档,分享给大家. LINUX安装oracle数据库步骤: 1.安装依赖包 yum -y install gcc gcc-c ...
- Java常考面试题(二)(转)
序言 昨天刚开始的"每日5题面试"这类文章,感觉还不错,把一些平常看似懂了的东西,弄清楚了.就像什么是虚拟机?这个问题,看起来知道,但是要说出个所以然来,又懵逼了,经常回过头来看看 ...
- Java开发程序员必须要学会的linux命令总结
查找文件 find / -name filename.txt 根据名称查找/目录下的filename.txt文件. find . -name "*.xml" 递归查找所有的xml文 ...
- thread.start和threadstart.invoke的区别
new Thread(() =>refreshDGVdelegate(App.StockList)).Start();//在新线程中执行操作 new ThreadStart(() => r ...
- 初学Java(1)
1.Java基本数据类型: 2.Java的main方法: 被static修饰,类名与文件名相同:void:方法的返回值,无返回值:main方法是程序的入口,有且只有一个: String[] args: ...
- 使用Ubuntu系统管理包工具(apt)部署Zabbix企业级监控系统
使用Ubuntu系统管理包工具(apt)部署Zabbix企业级监控系统 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. Ubuntu系统部署笔记:https://www.cnblo ...
- 51nod 1206:Picture 求覆盖周长
1206 Picture 题目来源: IOI 1998 基准时间限制:2 秒 空间限制:131072 KB 分值: 160 难度:6级算法题 收藏 关注 给出平面上的N个矩形(矩形的边平行于X轴和 ...
- 指定盘符获取u盘PID、VID、序列号等信息
最近学习scsi和DeviceIoControl,下载了微软WDK一些例子,以下代码精简自Windows-driver-samples-master\storage\tools\spti\src\sp ...
- spring-@ResponseBody返回时的编码处理
下面是一个解决方案 @RequestMapping(value = "/queryall", method = GET, produces = "application/ ...
- opencv python运动人体检测
采用非极大值抑制,将重叠的框合并成一个. # import the necessary packages from imutils.object_detection import non_max_su ...