Narzędzie fping jako alternatywa dla ping

fping to program do wysyłania  ICMP do hostów, jest podobny do ping, wyniki pokazywane przez program są znaczne czytelniejsze.
 
fpinga zainstalowałem na domowym serwerze, poniżej jak to zrobić:
apt-get update; apt-get install fping
 
Co nam oferuje:
root@debian:~# fping -h

Usage: fping [options] [targets...]
-a         show targets that are alive
-A         show targets by address
-b n       amount of ping data to send, in bytes (default 56)
-B f       set exponential backoff factor to f
-c n       count of pings to send to each target (default 1)
-C n       same as -c, report results in verbose format
-D         print timestamp before each output line
-e         show elapsed time on return packets
-f file    read list of targets from a file ( - means stdin) (only if no -g specified)
-g         generate target list (only if no -f specified)
(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)
-H n       Set the IP TTL value (Time To Live hops)
-i n       interval between sending ping packets (in millisec) (default 25)
-I if      bind to a particular interface
-l         loop sending pings forever
-m         ping multiple interfaces on target host
-n         show targets by name (-d is equivalent)
-O n       set the type of service (tos) flag on the ICMP packets
-p n       interval between ping packets to one target (in millisec)
(in looping and counting modes, default 1000)
-q         quiet (don't show per-target/per-ping results)
-Q n       same as -q, but show summary every n seconds
-r n       number of retries (default 3)
-s         print final stats
-S addr    set source address
-t n       individual target initial timeout (in millisec) (default 500)
-T n       ignored (for compatibility with fping 2.4)
-u         show targets that are unreachable
-v         show version
targets    list of targets to check (if no -f specified)

Przykładowe zastosowania

“Pingowanie hosta”:

root@debian:~# fping -lAns interia.pl
interia.pl (217.74.65.23) : [0], 84 bytes, 15.0 ms (15.0 avg, 0% loss)
interia.pl (217.74.65.23) : [1], 84 bytes, 16.0 ms (15.5 avg, 0% loss)
interia.pl (217.74.65.23) : [2], 84 bytes, 14.7 ms (15.2 avg, 0% loss)
interia.pl (217.74.65.23) : [3], 84 bytes, 15.5 ms (15.3 avg, 0% loss)
interia.pl (217.74.65.23) : [4], 84 bytes, 15.4 ms (15.3 avg, 0% loss)
interia.pl (217.74.65.23) : [5], 84 bytes, 14.9 ms (15.2 avg, 0% loss)
interia.pl (217.74.65.23) : [6], 84 bytes, 15.0 ms (15.2 avg, 0% loss)
interia.pl (217.74.65.23) : xmt/rcv/%loss = 7/7/0%, min/avg/max = 14.7/15.2/16.0

1 targets
1 alive
0 unreachable
0 unknown addresses

0 timeouts (waiting for response)
7 ICMP Echos sent
7 ICMP Echo Replies received
6 other ICMP received

14.7 ms (min round trip time)
15.2 ms (avg round trip time)
16.0 ms (max round trip time)
6.348 sec (elapsed real time)

 

Sprawdzanie wolnych adresów w sieci lokalnej:

 

fping -ag 192.168.1.0/24

i zrzut do pliku:

fping -a < host.txt

 

 

Polecam jako fajna alternatywę dla polecenia PING 😉