网络流量查看(需要安装工具)


1、查看总流量,可以安装工具iproute,

[root@localhost ~]# yum install -y iproute

Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
base | 3.6 kB 00:00:00
epel

---------------------------------------------------------

省略部分安装过程

--------------------------------------------------------

iproute.x86_64 0:4.11.0-30.el7

完毕!

利用命令查看ip -s -h link

2、查看实时网速,可以使用iptraf-ng

iptraf-ng未默认安装,需要安装

[root@localhost ~]# yum install -y iptraf-ng
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com

----------------------------------------------------------------------

省略部分安装数据

-----------------------------------------------------------------------


已安装:
iptraf-ng.x86_64 0:1.1.4-7.el7

完毕!

安装完成可以使用命令iptraf-ng -g

[root@localhost ~]# iptraf-ng -g

 3、dstat 是一个全能系统信息统计工具,支持数据实时刷新,输出直观易懂。dstat 默认没有安装,需要安装。

[root@localhost ~]# yum install -y dstat
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com

-----------------------------------------------------------------

省略部分安装数据

-----------------------------------------------------------------

已安装:
dstat.noarch 0:0.7.2-12.el7

完毕!

现在可用命令查看dstat -tnf 1 10 输出接下来10秒内每秒的网络数据:

 4、iftop 是一款实时流量监控工具,可以查看每个连接的实时速率。先进性安装,进行查看。

[root@localhost ~]# yum install -y iftop
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com

------------------------------------------------------------------

省略部分安装数据

-----------------------------------------------------------------

已安装:
iftop.x86_64 0:1.0-0.21.pre4.el7

完毕!

[root@localhost ~]# iftop -nN -i ens32   #使用此命令进行流量监控

 

 还有其他的方法,可以参考一下百度。

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM