Fping命令与Ping命令非常相似,使用ICMP回应请求和应答来确定系统的可达性。它提供了一些Ping没有的特殊功能.现在把常用的几个命令参数记录如下:
-a Show systems that are alive.
-u Show targets that are unreachable.
-e Show elapsed (round-trip) time of packets.
用法:
1、 fping -a 202.108.15.91 220.181.29.253
202.108.15.91
220.181.29.253
这种用法不好,因为如果出现很多的IP的话,你不知道有哪些IP是有问题的。
2、
fping -u 202.108.15.91 220.181.29.253 还可以,只显示不正常的。
3、
fping -e 202.108.15.91 220.181.29.253
202.108.15.91 is alive (40.6 ms)
220.181.29.253 is alive (30.2 ms)
220.181.29.2 is unreachable
这样看来-e是比较好的。正常的,有问题都反应出来。
4、
将目标文件清单放到文件中来使用。假定一个名为server-list的文件包含以下IP地址:
220.181.29.253
202.108.15.91
192.168.41.128
fping < server-list
192.168.41.128220.181.29.253 address not found
220.181.29.253 is alive
202.108.15.91 is alive
192.168.41.128 is alive
202.108.15.91 is alive
5、
-f Read list of targets from a file. This option can only be used by the root user. Regu©\
lar users should pipe in the file via stdin:
% fping < targets_file
fping -f server-list
192.168.41.128220.181.29.253 address not found
220.181.29.253 is alive
202.108.15.91 is alive
202.108.15.91 is alive
192.168.41.128 is alive
阅读(2900) | 评论(0) | 转发(1) |