fping的使用简介
fping 的優(yōu)點(diǎn):
1. 可以一次ping多個(gè)主機(jī)
2. 可以從主機(jī)列表文件ping
3. 結(jié)果清晰 便于腳本處理
4. 速度快
FPING命令詳解
我給大家做了一下翻譯
用法:fping[選項(xiàng)][目標(biāo)…]
調(diào)查選項(xiàng):
僅ping ipv4地址
-6,——ipv6只有ping ipv6地址
-b,——size=要發(fā)送的ping數(shù)據(jù)量,以字節(jié)為單位(默認(rèn)值:56)
-B,——backoff=N設(shè)置指數(shù)backoff因子為N(默認(rèn)值:1.5)
計(jì)數(shù)模式:發(fā)送N個(gè)ping到每個(gè)目標(biāo)
-f,——file=從文件中讀取目標(biāo)的文件列表(-表示stdin)
生成目標(biāo)列表(僅當(dāng)沒有指定-f時(shí))
(在目標(biāo)列表中給出開始和結(jié)束IP,或者一個(gè)CIDR地址)
(例如:fping -g 192.168.1.0 192.168.1.255或fping -g 192.168.1.0/24)
-H,——ttl=N設(shè)置IP ttl值(活跳時(shí)間)
-I,——iface= iface綁定到一個(gè)特定的接口
-l,——loop loop模式:永遠(yuǎn)發(fā)送ping信號(hào)
-m,——所有使用提供的主機(jī)名的所有ip(例如IPv4和IPv6),與-A一起使用
-M,——不要設(shè)置“不要分割”標(biāo)志
設(shè)置ICMP包上的服務(wù)類型(tos)標(biāo)志
-p,——period= ping包到一個(gè)目標(biāo)之間的MSEC間隔(單位:ms)
(in loop and count mode,默認(rèn):1000 ms)
-r,——重試=N次重試(默認(rèn):3次)
-R,——隨機(jī)分組數(shù)據(jù)(到箔鏈接數(shù)據(jù)壓縮)
-S,——src=IP設(shè)置源地址
-t,——timeout=MSEC單個(gè)目標(biāo)初始超時(shí)(默認(rèn):500 ms,
除了-l/-c/ -c,其中-p周期為2000 ms)
輸出選項(xiàng):
顯示有生命的目標(biāo)
-A, -addr顯示目標(biāo)地址
-C,——vcount=N與-C相同,以詳細(xì)格式報(bào)告結(jié)果
在每個(gè)輸出行之前打印時(shí)間戳
-e,——elapsed顯示返回?cái)?shù)據(jù)包消耗的時(shí)間
-i,——interval=發(fā)送ping包之間的MSEC間隔(默認(rèn)值:10 ms)
-n,——name按名稱顯示目標(biāo)(-d等效)
-N,——netdata輸出兼容netdata (-l -Q是必需的)
-o,——中斷顯示累計(jì)中斷時(shí)間(丟失包*包間隔)
-q,——非常非常(不要顯示每個(gè)目標(biāo)/每個(gè)ping的結(jié)果)
-Q,——squiet=秒數(shù),與-Q相同,但每n秒顯示摘要
-s,——stats打印最終的stats
顯示無法達(dá)到的目標(biāo)
-v,——版本顯示版本
-x,——可達(dá)=N表示>=N個(gè)主機(jī)是否可達(dá)
-a show targets that are alive
顯示可ping通的目標(biāo)
-A show targets by address
將目標(biāo)以ip地址的形式顯示
-b n amount of ping data to send, in bytes (default 56)
ping 數(shù)據(jù)包的大小。(默認(rèn)為56)
-B f set exponential backoff factor to f
設(shè)置指數(shù)反饋因子到f 【這個(gè)不懂,求指教~】
-c n count of pings to send to each target (default 1)
ping每個(gè)目標(biāo)的次數(shù) (默認(rèn)為1)
-C n same as -c, report results in verbose format
同-c, 返回的結(jié)果為冗長(zhǎng)格式
-e show elapsed time on return packets
顯示返回?cái)?shù)據(jù)包所費(fèi)時(shí)間
-f file read list of targets from a file ( - means stdin) (only if no -g specified)
從文件獲取目標(biāo)列表( - 表示從標(biāo)準(zhǔn)輸入)(不能與 -g 同時(shí)使用)
-g generate target list (only if no -f specified)
生成目標(biāo)列表(不能與 -f 同時(shí)使用)
(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)
(可指定目標(biāo)的開始和結(jié)束IP, 或者提供ip的子網(wǎng)掩碼)
(例:fping -g 192.168.1.0 192.168.1.255 或 fping -g 192.168.1.0/24)
-H n Set the IP TTL value (Time To Live hops)
設(shè)置ip的TTL值 (生存時(shí)間)
-i n interval between sending ping packets (in millisec) (default 25)
ping包之間的間隔(單位:毫秒)(默認(rèn)25)
-l loop sending pings forever
循環(huán)發(fā)送ping
-m ping multiple interfaces on target host
ping目標(biāo)主機(jī)的多個(gè)網(wǎng)口
-n show targets by name (-d is equivalent)
將目標(biāo)以主機(jī)名或域名顯示(等價(jià)于 -d )
-p n interval between ping packets to one target (in millisec)
對(duì)同一個(gè)目標(biāo)的ping包間隔(毫秒)
(in looping and counting modes, default 1000)
(在循環(huán)和統(tǒng)計(jì)模式中,默認(rèn)為1000)
-q quiet (don't show per-target/per-ping results)
安靜模式(不顯示每個(gè)目標(biāo)或每個(gè)ping的結(jié)果)
-Q n same as -q, but show summary every n seconds
同-q, 但是每n秒顯示信息概要
-r n number of retries (default 3)
當(dāng)ping失敗時(shí),最大重試次數(shù)(默認(rèn)為3次)
-s print final stats
打印最后的統(tǒng)計(jì)數(shù)據(jù)
-I if bind to a particular interface
綁定到特定的網(wǎng)卡
-S addr set source address
設(shè)置源ip地址
-t n individual target initial timeout (in millisec) (default 500)
單個(gè)目標(biāo)的超時(shí)時(shí)間(毫秒)(默認(rèn)500)
-T n ignored (for compatibility with fping 2.4)
請(qǐng)忽略(為兼容fping 2.4)
-u show targets that are unreachable
顯示不可到達(dá)的目標(biāo)
-O n set the type of service (tos) flag on the ICMP packets
在icmp包中設(shè)置tos(服務(wù)類型)
-v show version
顯示版本號(hào)
targets list of targets to check (if no -f specified)
需要ping的目標(biāo)列表(不能和 -f 同時(shí)使用)
-h show this page
顯示本幫助頁(yè)
有用的參數(shù):
-g ping 網(wǎng)段
-s 顯示統(tǒng)計(jì)
-r 1 設(shè)置重試次數(shù)
-cping每個(gè)目標(biāo)的次數(shù)
同時(shí)ping倆個(gè)IP10次
fping IP1 IP2 -c 10
ping只顯示結(jié)果不顯示過程
ping10次122.x.x.x
# fping -A -u -c 10 122.x.x.x 122.x.x.x : xmt/rcv/%loss = 10/10/0%, min/avg/max = 3.16/4.28/6.05
ping某個(gè)網(wǎng)段IP
fping -a -g 172.18.9.0/24
參考
總結(jié)
以上是生活随笔為你收集整理的fping的使用简介的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 1281
- 下一篇: 如何在URL筛选管理器中过滤不需要的UR