FPING(8)
โจ FPING(8) โจ
okay bestie, welcome to fping โ the manual page, section 8, group-chat edition ๐
๐ NAME ๐
fping โ send ICMP ECHO_REQUEST packets to network hosts ๐ฐ๏ธโจ
๐ SYNOPSIS ๐
fping [ options ] [ systems... ]
๐ฆ DESCRIPTION ๐ฆ
so fping is literally a program just like ping, and what it does is it uses the Internet Control Message Protocol (ICMP) echo request to figure out if a target host is responding, periodt ๐
but here's the tea โ fping is not like ping in the way it handles targets. with fping you can specify any number of targets right there on the command line, OR you can specify a file containing the lists of targets to ping. instead of sitting there sending to one target until it times out or replies, fping sends out a ping packet and then moves on to the next target in a round-robin fashion ๐ iconic behaviour honestly.
in the default mode, if a target replies, it's noted and removed from the list of targets to check ๐. and if a target does not respond within a certain time limit and/or retry limit, it gets designated as unreachable ๐.
fping also supports sending a specified number of pings to a target, or looping indefinitely (as in ping). and unlike ping, fping is meant to be used in scripts, so its output is designed to be easy to parse ๐ง no cap, it's giving automation-friendly.
current statistics can be obtained without termination of process with signal SIGQUIT (^\ from the keyboard on most systems) ๐ธ
โจ OPTIONS โจ
-4,--ipv4โ restrict name resolution and IPs to IPv4 addresses ๐-6,--ipv6โ restrict name resolution and IPs to IPv6 addresses ๐-a,--aliveโ show systems that are alive. (heads up bestie: options-cand-Coverride-a) ๐-A,--addrโ display targets by address rather than DNS name. combined with-d, the output will be both the ip and (if available) the hostname ๐-b,--size=BYTESโ number of bytes of ping data to send. the minimum size (normally12) allows room for the data thatfpingneeds to do its work (sequence number, timestamp). the reported received data size includes the IP header (normally20bytes) and ICMP header (8bytes), so the minimum total size is40bytes. default is56, as inping. maximum is the theoretical maximum IP datagram size (64K), though most systems limit this to a smaller, system-dependent number. cannot be used together with--icmp-timestamp๐ซ-B,--backoff=Nโ backoff factor. in the default mode,fpingsends several requests to a target before giving up, waiting longer for a reply on each successive request. this parameter is the value by which the wait time (-t) is multiplied on each successive request; it must be entered as a floating-point number (x.y). the default is1.5โณ-c,--count=Nโ number of request packets to send to each target. in this mode, a line is displayed for each received response (this can be suppressed with-qor-Q). also, statistics about responses for each target are displayed when all requests have been sent (or when interrupted). this option overrides-aor-u๐ฅ-C,--vcount=Nโ similar to-c, but the per-target statistics are displayed in a format designed for automated response-time statistics gathering. for example:
$ fping -C 5 -q somehost
somehost : 91.7 37.0 29.2 - 36.8
shows the response time in milliseconds for each of the five requests, with the - indicating that no response was received to the fourth request. this option overrides -a or -u ๐
--check-sourceโ discard Echo replies that are sourced from a different address than the target address. this avoids spurious reachability results on busy monitoring systems where twofpinginstances with the same lower 16 bits of the process ID may be running at the same time ๐ lowkey a lifesaver-d,--rdnsโ use DNS to lookup address of ping target. this allows you to givefpinga list of IP addresses as input and print hostnames in the output. this is similar to option-n/--name, but will force a reverse-DNS lookup even if you give hostnames as target (NAME->IP->NAME) ๐-D,--timestampโ add Unix timestamps in front of output lines generated with in looping or counting modes (-l,-c, or-C) โฐ
Subcommand: --timestamp-format=ctime|iso|rfc3339
allow to change the timestamp format of the -D option to the following format types.
ctime="%c"(Example:Mon Jun 10 07:50:00 2024)iso="%Y-%m-%dT%T%z"(Example:2024-06-10T07:50:00+0200)rfc3339="%Y-%m-%d %H:%M:%S"(Example:2024-06-10 07:50:00)
-e,--elapsedโ show elapsed (round-trip) time of packets ๐-f,--fileโ read list of targets from a file ๐-g,--generate addr/maskโ generate a target list from a supplied IP netmask, or a starting and ending IP. specify the netmask or start/end in the targets portion of the command line. if an IPv4 network with netmask is given, the network and broadcast addresses will be excluded ๐ฏ
Example: to ping the network 192.168.1.0/24, the specified command line could look like either:
$ fping -g 192.168.1.0/24
or
$ fping -g 192.168.1.1 192.168.1.254
-h,--helpโ print usage message ๐ฌ-H,--ttl=Nโ set the IP TTL field (time to live hops) โฑ๏ธ--print-ttlโ displays the IPv4 TTL value from the IP Header in the output. iffpingcannot read the TTL value,"(TTL unknown)"is returned ๐คทโ๏ธ-i,--interval=MSECโ the minimum amount of time (in milliseconds) between sending a ping packet to any target (default is10, minimum is0(1for non-root users iffpingwas configured with"--enable-safe-limits")) โฒ๏ธ-I,--iface=IFACEโ set the interface (requiresSO_BINDTODEVICEsupport) ๐--icmp-timestampโ send ICMP timestamp requests (ICMP type13) instead of ICMP Echo requests. print ICMP timestamps for originate, receive, and transmit, together with the local receive time in the same format, in addition to normal output. cannot be used together with-bbecause ICMP timestamp messages have a fixed size. IPv4 only, requires root privileges orcap_net_raw๐-J,--jsonโ format output JSON (-c,-C, or-lrequired) ๐งพ
Example usage:
$ fping -J -c 1 127.0.0.1
or
$ fping -J -s -c 1 -q 127.0.0.1
-k,--fwmark=FWMARKโ set FWMARK on ping packets for policy-based routing. requires Linux kernel2.6.25<=, and root privileges orcap_net_admin๐ง-l,--loopโ loop sending packets to each target indefinitely. can be interrupted withCtrl-C; statistics about responses for each target are then displayed ๐-m,--allโ send pings to each of a target host's multiple IP addresses (use of option'-A'is recommended) ๐-M,--dontfragโ set the"Don't Fragment"bit in the IP header (used to determine/test the MTU) ๐งฉ-n,--nameโ if targets are specified as IP addresses, do a reverse-DNS lookup on them to print hostnames in the output ๐ท๏ธ-N,--netdataโ format output for netdata (-l -Qare required). see:https://netdata.cloud/๐-o,--outageโ calculate"outage time"based on the number of lost pings and the interval used (useful for network convergence tests) โก-O,--tos=Nโ set the typ of service flag (TOS). N can be either decimal or hexadecimal (0xh) format ๐๏ธ--print-tosโ displays the TOS value in the output. iffpingcannot read the TOS value,"(TOS unknown)"is returned ๐คทโ๏ธ-p,--period=MSECโ in looping or counting modes (-l,-c, or-C), this parameter sets the time in milliseconds thatfpingwaits between successive packets to an individual target. default is1000and minimum is0.001(10for non-root users iffpingwas configured with"--enable-safe-limits") ๐ฐ๏ธ-q,--quietโ quiet. don't show per-probe results, but only the final summary. also don't show ICMP error messages ๐คซ-Q,--squiet=SECS[,cumulative]โ like-q, but additionally show interval summary results everySECSseconds. withcumulative, show summary results since start instead of for the last interval, unless option-Nis used, too ๐-r,--retry=Nโ retry limit (default3). this is the number of times an attempt at pinging a target will be made, not including the first try ๐-R,--randomโ instead of using all-zeros as the packet data, generate random bytes. use to defeat, e.g., link data compression ๐ฒ-s,--statsโ print cumulative statistics upon exit ๐-S,--src=addrโ set source address ๐ฎ--seqmap-timeout=MSECโ timeout for sequence number mappings in milliseconds. sequence numbers can be reused after the timeout. the default value is10000ms๐ข-t,--timeout=MSECโ initial target timeout in milliseconds. in the default, non-loop mode, the default timeout is500ms, and it represents the amount of time thatfpingwaits for a response to its first request. successive timeouts are multiplied by the backoff factor specified with-Bโณ
in loop/count mode, the default timeout is automatically adjusted to match the "period" value (but not more than 2000ms). you can still adjust the timeout value with this option, if you wish to, but note that setting a value larger than "period" produces inconsistent results, because the timeout value can be respected only for the last ping ๐ญ
also note that any received replies that are larger than the timeout value, will be discarded ๐๏ธ
-T nโ ignored (for compatibility withfping2.4) ๐ป-u,--unreachโ show targets that are unreachable. (options-cand-Coverride-u) ๐-v,--versionโ printfpingversion information ๐ท๏ธ-x,--reachable=Nโ given a list of hosts, this mode checks if number of reachable hosts is>= Nand exits true in that case โ-X,--fast-reachable=Nโ given a list of hosts, this mode immediately exits true onceNalive hosts have been found ๐โ๏ธ
๐ EXAMPLES ๐
generate 20 pings to two hosts in ca. 1 second (i.e. one ping every 50 ms to each host), and report every ping RTT at the end:
$ fping --quiet --interval=1 --vcount=20 --period=50 127.0.0.1 127.0.0.2
๐ AUTHORS ๐
- Roland J. Schemers III, Stanford University, concept and versions 1.x ๐ง
- RL "Bob" Morgan, Stanford University, versions 2.x ๐ซ
- David Papp, versions 2.3x and up ๐ ๏ธ
- David Schweikert, versions 3.0 and up ๐
fping website: http://www.fping.org ๐
๐ DIAGNOSTICS ๐
exit status is 0 if all the hosts (or the number of hosts specified with -x or -X) are reachable, 1 if some (or too many with -x or -X) hosts were unreachable, 2 if any IP addresses were not found, 3 for invalid command line arguments, and 4 for a system call failure ๐ฆ
๐ง RESTRICTIONS ๐ง
okay bestie, listen up, because there are some hard limits here and you need to know them before you go feral with the flags ๐
- The number of addresses you can generate with the
-g,--generateoption is capped at131072โ and yes, that's exactly the number of host addresses in one 111-bit IPv6 prefix, which is two more than the host addresses in one 15-bit IPv4 prefix. math is math, no cap ๐งฎโจ - The length of target names read from a file or from standard input? Limited to
255bytes. so keep your names cute but short ๐ - The minimum interval for sending successive packets to an individual target, set with the
-p noption, is0.001msec. you literally cannot go faster than that, she said what she said โฑ๏ธ๐ - and if
fpingwas configured with--enable-safe-limits, then for non-root users the following values are NOT allowed (sorry not sorry, it's for your own good ๐):-i n, wheren<1msec-p n, wheren<10msec
bestie if you're not root, those two ranges are a no-go zone ๐ซ root can do whatever, but the rest of us gotta respect the limits fr fr.
๐ SEE ALSO ๐
ping(8)โ the og, the blueprint, the blueprint that ate ๐
and that's a wrap on the whole page, bestie!! this manual is from the fping source, version dated 2025-12-31, and the page itself is FPING(8) โ go ping something cute, stay within the limits, and slay the network diagnostics game ๐ธ๐ฆ๐โจ periodt ๐
๐ฆ where this page comes from
- alpine 3.24: fping-doc 5.5-r0 ยท MIT
- arch rolling: fping 5.5-1 ยท custom
- fedora 43: fping 5.5-1.fc43 ยท BSD-4.3TAHOE
- fedora 44: fping 5.5-1.fc44 ยท BSD-4.3TAHOE
- nixpkgs unstable: fping 5.5
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms