You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fping first adds all given targets (hosts) to an internal table, and then sends probes to every target in this table. DNS name resolution happens during the first phase only. If DNS resolution of a target given as a name fails, it is not added to the internal table, and the later fping code does not know about it. Only a counter for name resolution errors is increased.
If you do not use -q, an error message is printed:
$ fping 8.8.8.8 name.is.invalid
name.is.invalid: Name or service not known
8.8.8.8 is alive
$ fping -c3 8.8.8.8 name.is.invalid
name.is.invalid: Name or service not known
8.8.8.8 : [0], 64 bytes, 12.8 ms (12.8 avg, 0% loss)
8.8.8.8 : [1], 64 bytes, 13.3 ms (13.0 avg, 0% loss)
8.8.8.8 : [2], 64 bytes, 13.6 ms (13.2 avg, 0% loss)
8.8.8.8 : xmt/rcv/%loss = 3/3/0%, min/avg/max = 12.8/13.2/13.6
With -s, the number of names that could not be resolved is printed after pinging usable targets:
$ fping -s 8.8.8.8 name.is.invalid
name.is.invalid: Name or service not known
8.8.8.8 is alive
1 targets
1 alive
0 unreachable
1 unknown addresses
0 timeouts (waiting for response)
1 ICMP Echos sent
1 ICMP Echo Replies received
0 other ICMP received
15.6 ms (min round trip time)
15.6 ms (avg round trip time)
15.6 ms (max round trip time)
0.025 sec (elapsed real time)
If no IP address for a target is found, the exit code is set to 2. You could check this in a script:
I use fping to do check with domain and ip mixed,like this:
When the network breakdown,DNS is out of work,and after the DNS cache expired,
the result looks like this:no domain result
If there is a domain result will simplify the script logic afterwards.
I want the result like this:
Should this be a new feature?
The text was updated successfully, but these errors were encountered: