前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >观察网络流量的工具-iptraf-ng

观察网络流量的工具-iptraf-ng

作者头像
xuyaowen
发布2020-12-30 14:59:21
1.5K0
发布2020-12-30 14:59:21
举报
文章被收录于专栏:XUYAOWEN的专栏

最近看到vmlinux大神介绍了一款网络查看工具,感觉很好用,下面进行简要摘录:

iptraf-ng 可以方便查看当前服务器网络状况:CentOS 7.0,采用了衍生版本iptraf-ng 。

代码语言:javascript
复制
iptraf-ng -h
usage: iptraf-ng [options]
   or: iptraf-ng [options] -B [-i <iface> | -d <iface> | -s <iface> | -z <iface> | -l <iface> | -g]

    -h, --help            show this help message

    -i <iface>            start the IP traffic monitor (use '-i all' for all interfaces)
    -d <iface>            start the detailed statistics facility on an interface
    -s <iface>            start the TCP and UDP monitor on an interface
    -z <iface>            shows the packet size counts on an interface
    -l <iface>            start the LAN station monitor (use '-l all' for all LAN interfaces)
    -g                    start the general interface statistics

    -B                    run in background (use only with one of the above parameters
    -f                    clear all locks and counters
    -t <n>                run only for the specified <n> number of minutes
    -L <logfile>          specifies an alternate log file

简要步骤:

“iptraf -g” 显示每一个网卡上的流量:

“iptraf -d eth0” 显示指定网卡上的流量统计,总体流量、流入量、流出量、以及按协议分类的流量统计:

 “iptraf -s eth0” 统计各port的流量:

“iptraf -i eth0” 查看远程主机端口:

“iptraf -i eth0” 的输出分为两个窗口,上面是TCP socket pairs,下面是UDP。我们根据端口号 使用 lsof 可以找到对应的进程号; 

参考文件:

http://linuxperf.com/?p=11 

观察网络性能时如何选择工具

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2020-05-19 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档