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 -c and -C override -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 (normally 12) allows room for the data that fping needs to do its work (sequence number, timestamp). the reported received data size includes the IP header (normally 20 bytes) and ICMP header (8 bytes), so the minimum total size is 40 bytes. default is 56, as in ping. 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, fping sends 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 is 1.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 -q or -Q). also, statistics about responses for each target are displayed when all requests have been sent (or when interrupted). this option overrides -a or -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 two fping instances 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 give fping a 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. if fping cannot 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 is 10, minimum is 0 (1 for non-root users if fping was configured with "--enable-safe-limits")) โฒ๏ธ
  • -I, --iface=IFACE โ€” set the interface (requires SO_BINDTODEVICE support) ๐Ÿ”Œ
  • --icmp-timestamp โ€” send ICMP timestamp requests (ICMP type 13) 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 -b because ICMP timestamp messages have a fixed size. IPv4 only, requires root privileges or cap_net_raw ๐Ÿ‘‘
  • -J, --json โ€” format output JSON (-c, -C, or -l required) ๐Ÿงพ

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 kernel 2.6.25<=, and root privileges or cap_net_admin ๐Ÿง
  • -l, --loop โ€” loop sending packets to each target indefinitely. can be interrupted with Ctrl-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 -Q are 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. if fping cannot 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 that fping waits between successive packets to an individual target. default is 1000 and minimum is 0.001 (10 for non-root users if fping was 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 every SECS seconds. with cumulative, show summary results since start instead of for the last interval, unless option -N is used, too ๐Ÿ“ˆ
  • -r, --retry=N โ€” retry limit (default 3). 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 is 10000ms ๐Ÿ”ข
  • -t, --timeout=MSEC โ€” initial target timeout in milliseconds. in the default, non-loop mode, the default timeout is 500ms, and it represents the amount of time that fping waits 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 with fping 2.4) ๐Ÿ‘ป
  • -u, --unreach โ€” show targets that are unreachable. (options -c and -C override -u) ๐Ÿ’”
  • -v, --version โ€” print fping version information ๐Ÿท๏ธ
  • -x, --reachable=N โ€” given a list of hosts, this mode checks if number of reachable hosts is >= N and exits true in that case โœ…
  • -X, --fast-reachable=N โ€” given a list of hosts, this mode immediately exits true once N alive 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, --generate option is capped at 131072 โ€” 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 255 bytes. so keep your names cute but short ๐ŸŽ€
  • The minimum interval for sending successive packets to an individual target, set with the -p n option, is 0.001 msec. you literally cannot go faster than that, she said what she said โฑ๏ธ๐Ÿ’€
  • and if fping was 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, where n < 1 msec
    • -p n, where n < 10 msec
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