Ping is the most common command tool in the system, and fping is the enhanced version of ping. The installation process is simple: [root @ mail/] # wget -- limit-rate500khttp: // There is one of the most common command tools in the Ghost system -- ping, and fping is the enhanced version of the ping tool. The installation process is very simple: [root @ mail/] # wget -- limit-rate 500 k http://www.fping.org/dist/fping-3.8.tar.gz?root@mail/] # tar zxvf fping-3.8.tar.gz & cd fping-3.8 [root @ mail/] #. /configure & make install [root @ mail/] # fping -- helpfping: invalid option -- '-' Usage: fping [options] [targets...]
-Show targets that are alive
-Show targets by address
-B nAmount of ping data to send, in bytes (default 56)
-B fSet exponential backoff factor to f
-C nCount of pings to send to each target (default 1)
-C nSame as-c, report results in verbose format
-DPrint timestamp before each output line
-EShow elapsed time on return packets
-F fileRead list of targets from a file (-means stdin) (only if no-g specified)
-GGenerate 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 nSet the ip ttl value (Time To Live hops)
-I nInterval between sending ping packets (in millisec) (default 25)
-LLoop sending pings forever
-MPing multiple interfaces on target host
-NShow targets by name (-d is equivalent)
-P nInterval between ping packets to one target (in millisec) (in looping and counting modes, default 1000)
-QQuiet (don't show per-target/per-ping results)
-Q nSame as-q, but show summary every n seconds
-R nNumber of retries (default 3)
-SPrint final stats
-I ifBind to a special interface
-S addrSet source address
-T nIndividual target initial timeout (in millisec) (default 500)
-T nIgnored (for compatibility with fping 2.4)
-UShow targets that are unreachable
-O nSet the type of service (tos) flag on the ICMP packets
-VShow version
Practical cases
- Active host in the outbound Lan
[Root @ mail/] # fping-a 192.168.0.1/24-g 2>/dev/null192.168.0.1192.160.3 ..................
Fping has A-d, which returns the host name through each echo response for DNS query. This option can be used to print the host name in the ping response information instead of the IP address [root @ mail/] # cat ip_list.txt192.168.255.5192.168.255.11192.168.255.53192.168.255.241 ........................ [Root @ mail/] # fping-a-d 2>/dev/null <ip_list.txtwww.vqiudns.vqiu