fping is a ping like program which uses the Internet Control Message Protocol (ICMP) echo request to determine if a host is up. fping is different from ping in that you can specify any number of hosts on the command line, or specify a file containing the lists of hosts to ping. Instead of trying one host until it timeouts or replies, fping will send out a ping packet and move on to the next host in a round-robin fashion. If a host replies, it is noted and removed from the list of hosts to check. If a host does not respond within a certain time limit and/or retry limit it will be considered unreachable. Unlike ping, fping is meant to be used in scripts and its output is easy to parse.

fping [ options ] [ systems… ]


-a Show systems that are alive.

-d Use DNS to lookup address of return ping packet. This allows you to
give fping a list of IP addresses as input and print hostnames in
the output.

-e Show elapsed (round-trip) time of packets

-f Read list of system from a file. This option can only be used by
the root user. Regular users should pipe in the file via stdin:
fping < targets_file -g 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. ex. To ping the class C 192.168.1.x, the specified command line could look like either: fping -g or fping -g -in The minimum amount of time (in milliseconds) between sending a ping packet to any host (default is 10). -q Quiet. Don't show per host results, just set final exit status. -rn Retry limit (default 3). This is the number of times an attempt at pinging a host will be made, not including the first try. -s Dump final statistics. -tn Individual host timeout in milliseconds (default 2500). This is the minimum number of milliseconds between ping packets directed towards a given host. -u Show systems that are unreachable. fping a list of IP addresses as input and have the results printed as hostnames. Examples: $ fping -g is alive is alive is alive is alive is alive is alive is alive is alive is alive is alive is alive is alive is alive is alive is alive is alive is alive is alive is alive ....... $ fping -d google.com yahoo.com digg.com reddit.com google.com is alive yahoo.com is alive digg.com is alive reddit.com is alive

Leave a Reply