标签:工具 min between each local sde delay print dmi
1、整理好待测试的目标IP 及对应端口号,存为本地文本文件2、安装好tcping工具
Tcping 相关参数
tcping, (C) 2003 folkert@vanheusden.com
-h hostname hostname (e.g. localhost)
-p portnr portnumber (e.g. 80)
-c count how many times to connect
-i interval delay between each connect
-f flood connect (no delays)
-q quiet, only returncode
3、Shell 编写
#!/bin/bash
i=/home/admin/test/youxi1
cat $i |
while read line
do
host=echo $line | awk -F ‘ ‘ ‘{print $1}‘
port=echo $line | awk -F ‘ ‘ ‘{print $2}‘
tcping -h $host -p $port -c 10 -i 0.5
done
保存为 tcping.sh
4、执行 bash tcping.sh
标签:工具 min between each local sde delay print dmi
原文地址:http://blog.51cto.com/lihongweibj/2298153