LinuxCommandLibrary

fping

parallel ping utility for multiple hosts

TLDR

Ping multiple hosts

$ fping [host1] [host2] [host3]
copy
Ping hosts from a file
$ fping -f [path/to/hosts.txt]
copy
Ping a range of IP addresses
$ fping -g [192.168.1.1] [192.168.1.254]
copy
Ping a CIDR range
$ fping -g [192.168.1.0/24]
copy
Show only alive hosts
$ fping -a [host1] [host2]
copy
Show only unreachable hosts
$ fping -u [host1] [host2]
copy
Ping with statistics (like ping)
$ fping -s [host1] [host2]
copy
Continuous ping with interval
$ fping -l -p [1000] [host]
copy

SYNOPSIS

fping [-aAcdDeglmnqQrstuvV] [-b size] [-B backoff] [-c count] [-f file] [-g addr/mask] [-i interval] [-p period] [-r retry] [-S source] [-t timeout] [targets]

DESCRIPTION

fping is designed for scripting and monitoring, offering significant advantages over the standard ping command for checking multiple hosts. It can ping many hosts in parallel and report results in formats suitable for parsing.
Unlike ping which waits for each host to respond before continuing, fping sends probes in a round-robin fashion to all targets, then waits for responses. This parallelism makes it vastly faster when checking many hosts.
The tool is commonly used in network monitoring scripts, host discovery, and availability checking. The -g option for generating IP ranges enables quick subnet scans. Exit codes indicate overall reachability status, useful in scripts.
Output modes range from verbose per-ping information to quiet mode showing only summaries. The alive-only (-a) and unreachable-only (-u) modes simplify parsing when you only need specific results.
fping can read targets from files or stdin, enabling integration with other tools. For continuous monitoring, loop mode (-l) with custom intervals provides ongoing status updates.

PARAMETERS

-a

Show only alive (reachable) hosts.
-u
Show only unreachable hosts.
-g addr/mask or start end
Generate target list from CIDR or range.
-f file
Read targets from file (- for stdin).
-c count
Number of pings to send per target.
-l
Loop: keep pinging indefinitely.
-p period
Interval between pings to same target (ms).
-i interval
Interval between pings to different targets (ms).
-t timeout
Individual ping timeout in milliseconds.
-r retry
Number of retries for unreachable hosts.
-s
Print cumulative statistics at end.
-q
Quiet: only show summary.
-e
Show elapsed time for replies.
-A
Show targets by IP address.
-D
Show timestamps before each line.
-S source
Set source address.
-b size
Ping packet size in bytes.

CAVEATS

Requires root/sudo for raw socket access on some systems (or setuid installation). Very fast scanning may be detected as aggressive by network security. High probe rates can stress network infrastructure. Some hosts may block ICMP.

HISTORY

fping was written by Roland Schemers around 1992 at Stanford University to address limitations in the standard ping for network monitoring. It has become a standard tool for network administrators and is included in most Linux distribution repositories.

SEE ALSO

ping(8), nmap(1), hping3(8), mtr(8)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community