首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >诊断可能的间歇性网络故障/减速;工具?

诊断可能的间歇性网络故障/减速;工具?
EN

Server Fault用户
提问于 2011-08-18 18:05:48
回答 2查看 6.5K关注 0票数 4

是否有一个简单的(linux )工具可以连续运行一段时间,以查看在wan上的两个特定网络端点之间是否存在任何连接问题?

一个远程站点正在经历减速/下降,我正在寻找找出哪一方的网络是错误的。

编辑

获接纳的答案建议“地铁”,供日后参考,地铁接受下列有关方案:

代码语言:javascript
复制
--report    
    This option puts mtr into report mode. When in this mode, mtr will run for 
    the number of cycles specified by the -c option, and then print statistics 
    and exit. 
    This mode is useful for generating statistics about network quality.
    Note that each running instance of mtr generates a significant amount of 
    network traffic. Using mtr to measure the quality of your network may result 
    in decreased network performance. 

--report-cycles COUNT
    Use this option to set the number of pings sent to determine both the 
    machines on the network and the reliability of those machines. 
    Each cycle lasts one second. 
EN

回答 2

Server Fault用户

回答已采纳

发布于 2011-08-18 19:39:54

看看地铁。它是traceroute和ping合并成一个工具,并持续监视两个主机之间的路径。下面的输出是这样的。它可以作为包地铁-微小的Ubuntu和地铁的CentOS。

代码语言:javascript
复制
                               My traceroute  [v0.75]
somehost.lan (0.0.0.0)                                  Thu Aug 18 20:52:49 2011
Keys:  Help   Display mode   Restart statistics   Order of fields   quit
                                           Packets               Pings
 Host                                    Loss%   Snt   Last   Avg  Best  Wrst StDev
 1. somehost.lan                                0.0%    56    0.3   0.3   0.2   0.5   0.0
 2. 192.168.1.254                         0.0%    55   82.8  48.1   2.9 100.6  31.5
 3. 94-192-160-1.zone6.bethere.co.uk     76.4%    55  11038 11232 11038 11450 156.1
 4. 10.1.3.245                           25.9%    55   17.6  17.6  16.8  20.6   0.7
 5. ???
 6. ???
 7. linx1-hex.webfusion.com              96.3%    55   23.6  23.8  23.6  24.1   0.3
 8. ???
 9. supanames-22.supanames.co.uk          0.0%    55   31.4  31.4  30.5  38.0   1.0
票数 8
EN

Server Fault用户

发布于 2011-08-18 18:11:36

我会用这样的一个小shell脚本来完成这个任务:

代码语言:javascript
复制
#!/bin/bash
while true; do
  date >> mylogfile.txt
  ping -c 5 sometestnode >> mylogfile.txt
  sleep 5
done

这样运行脚本,以便在您注销后继续运行:

代码语言:javascript
复制
nohup scriptname.sh &

一旦您等待了适当的时间,您只需要终止进程并查看日志文件。当然,你想用哪种方式都可以对它进行调整。

票数 1
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/302684

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档