centos系统下网络连通测试工具mtr

简介
Mtr是 Linux系统中一个非常棒的网络连通性判断工具,它结合了ping, traceroute,nslookup 的相关特性。
A、install software
# yum -y install mtr
# yum info mtr
Loaded plugins: fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
* webtatic: sp.repo.webtatic.com
Installed Packages
Name : mtr
Arch : x86_64
Epoch : 2
Version : 0.75
Release : 5.el6
Size : 96 k
Repo : installed
From repo : anaconda-CentOS-201303050102.x86_64
Summary : A network diagnostic tool
URL : http://www.BitWizard.nl/mtr
License : GPLv2+
Description : Mtr is a network diagnostic tool that combines ping and traceroute
: into one program. Mtr provides two interfaces: an ncurses interface,
: useful for using Mtr from a telnet session; and a GTK+ interface for X
: (provided in the mtr-gtk package).

# mtr -h
usage: mtr [-hvrwctglspniu46] [--help] [--version] [--report]
[--report-wide] [--report-cycles=COUNT] [--curses] [--gtk]
[--raw] [--split] [--no-dns] [--address interface]
[--psize=bytes/-s bytes]
[--interval=SECONDS] HOSTNAME [PACKETSIZE]

mtr常用的几个参数:

-v:查看当前版本号;

-r:以报告模式显示,不加-r会动态的显示;

-c:设置每秒发送数据包的数量,默认值是10;

-s:指定ping数据包的大小;

-n:相当于--no-dns 不解析dns;
B、test

# mtr www.baidu.com
# mtr 119.29.29.29
My traceroute [v0.75]
localhost.localdomain (0.0.0.0) Thu Nov 23 15:31:12 2017
Resolver error: No error returned but no answers given. of fields quit
Packets Pings
Host Loss% Snt Last Avg Best Wrst StDev

第一列:host显示的是IP地址和本机域名,这点和tracert很像;

第二列:loss%就是对应IP行的丢包率了,需要注意的是有些丢包是由于icmp的保护机制造成的,并不 代表真的丢包;

第三列:snt每秒发送数据包的数量,默认值是10,窝这里通过参数 -c来指定发送15个包;

第四列:Last显示的最近一次的返回时延;
第五列:Avg是平均值 这个应该是发送ping包的平均时延;
第六列:Best是最好或者说时延最短的;
第七列:Wrst是最差或者说时延最常的;
第八列:StDev是标准偏差,统计学名词,一种量度数据分布的分散程度标准,用以衡量数据值偏离算术平均值的程度。标准偏差越小,这些值偏离平均值就越少。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值