|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的好朋友们!体系中有个最最经常使用下令工具--ping,而fping是ping工具的增强版本。装置历程很复杂:[root@mail/]#wget--limit-rate500khttp://www.fping.org/dist/fping-3.8.tar.gz
[root@mail/]#tarzxvffping-3.8.tar.gz&&cdfping-3.8
[root@mail/]#./configure&&make&&makeinstall
[root@mail/]#fping--help
fping:invalidoption---
Usage:fping[options][targets...]
-ashowtargetsthatarealive
-Ashowtargetsbyaddress
-bnamountofpingdatatosend,inbytes(default56)
-Bfsetexponentialbackofffactortof
-cncountofpingstosendtoeachtarget(default1)
-Cnsameas-c,reportresultsinverboseformat
-Dprinttimestampbeforeeachoutputline
-eshowelapsedtimeonreturnpackets
-ffilereadlistoftargetsfromafile(-meansstdin)(onlyifno-gspecified)
-ggeneratetargetlist(onlyifno-fspecified)
(specifythestartandendIPinthetargetlist,orsupplyaIPnetmask)
(ex.fping-g192.168.1.0192.168.1.255orfping-g192.168.1.0/24)
-HnSettheIPTTLvalue(TimeToLivehops)
-inintervalbetweensendingpingpackets(inmillisec)(default25)
-lloopsendingpingsforever
-mpingmultipleinte***cesontargethost
-nshowtargetsbyname(-disequivalent)
-pnintervalbetweenpingpacketstoonetarget(inmillisec)
(inloopingandcountingmodes,default1000)
-qquiet(dontshowper-target/per-pingresults)
-Qnsameas-q,butshowsummaryeverynseconds
-rnnumberofretries(default3)
-sprintfinalstats
-Iifbindtoaparticularinte***ce
-Saddrsetsourceaddress
-tnindividualtargetinitialtimeout(inmillisec)(default500)
-Tnignored(forcompatibilitywithfping2.4)
-ushowtargetsthatareunreachable
-Onsetthetypeofservice(tos)flagontheICMPpackets
-vshowversion
有用案例
[root@mail/]#fping-a192.168.0.1/24-g2>/dev/null
192.168.0.1
192.168.0.3
………………
fping有一个-d,它经由过程每个echo回应举行DNS查询来前往主机名。利用该选项能够在ping的回应信息中打印出主机名而非IP地点
[root@mail/]#catip_list.txt
192.168.20.5
192.168.20.11
192.168.20.53
192.168.20.241
……………………
[root@mail/]#fping-a-d2>/dev/null<ip_list.txt
www.vqiu
dns.vqiu
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的好朋友们! |
|