fping功具安装使用

centos7取消了ifconfig,用 ip addr 查看IP地址
安装http://fping.org/

centos如果没有安装wget

yum -y install wget

如果安装直接
wget http://fping.org/dist/fping-3.10.tar.gz

解压文件
tar -xvf fping-3.10.tar.gz
进入目录
cd fping-3.10/

./config
如果这里报错请解决问题再装

然后编译
make

安装
make install

————————

fping -v 可以查看版本号 -h查看帮助 man fping查看详细介绍帮助

-a show targets that are alive
-A show targets by address
-b n amount of ping data to send, in bytes (default 56)
-B f set exponential backoff factor to f
-c n count of pings to send to each target (default 1)
-C n same as -c, report results in verbose format
-D print timestamp before each output line
-e show elapsed time on return packets
-f file read list of targets from a file ( – means stdin) (only if no -g specified)
-g generate target list (only if no -f specified)
(specify the start and end IP in the target list, or supply a IP netmask)
(ex. fping -g 192.168.1.0 192.168.1.255 or fping -g 192.168.1.0/24)
-H n Set the IP TTL value (Time To Live hops)
-i n interval between sending ping packets (in millisec) (default 25)
-I if bind to a particular interface
-l loop sending pings forever
-m ping multiple interfaces on target host
-n show targets by name (-d is equivalent)
-O n set the type of service (tos) flag on the ICMP packets
-p n interval between ping packets to one target (in millisec)
(in looping and counting modes, default 1000)
-q quiet (don’t show per-target/per-ping results)
-Q n same as -q, but show summary every n seconds
-r n number of retries (default 3)
-s print final stats
-S addr set source address
-t n individual target initial timeout (in millisec) (default 500)
-T n ignored (for compatibility with fping 2.4)
-u show targets that are unreachable
-v show version
——————————————–

fping -g 192.168.1.1 192.168.1.255
fping -a -g 192.168.1.1/255
fping -a -f ./iplist.txt
fping -u -f ./iplist2.txt

发表评论

邮箱地址不会被公开。 必填项已用*标注

*