Linux 环境查看《网络流量》工具及命令

1. nethogs: 按进程查看流量占用

[root@localhost ~]# yum -y install epel-release.noarch

root@localhost ~]# yum -y install nethogs.x86_64

 

2. iptraf: 按连接/端口查看流量

[root@localhost ~]# yum -y install iptraf-ng.x86_64

 

3. ifstat: 按设备查看流量

http://gael.roualland.free.fr/ifstat/  (官网)

[root@localhost ~]# wget http://gael.roualland.free.fr/ifstat/ifstat-1.1.tar.gz

[root@localhost ~]# tar xf ifstat-1.1.tar.gz

[root@localhost ~]# cd ifstat-1.1

[root@localhost ifstat-1.1]# yum -y install gcc net-snmp

[root@localhost ifstat-1.1]# ./configure

[root@localhost ifstat-1.1]# make && make install

[root@localhost ifstat-1.1]# which ifstat

/usr/local/bin/ifstat

[root@localhost ifstat-1.1]# /usr/local/bin/ifstat -tT

 

4. ethtool: 诊断工具

 

5. tcpdump: 抓包工具

[root@localhost ~]# yum -y install tcpdump.x86_64

6. ss: 连接查看工具

[root@localhost ~]# ss -tnl

7. 其他:

 1)dstat,

[root@localhost ~]# yum -y install dstat.noarch

[root@Test-Server-01 ~]# dstat -nf

 

 

2) slurm,

集群使用

3)nload,

[root@localhost ~]# yum -y install nload.x86_64

 

4)bmon

[root@localhost ~]# yum -y install bmon.x86_64 

###############################################################################

 

1. 命令行有 vnstat,轻量, 支持统计

# yum -y install vnstat.x86_64

# vnstat -u -i eth0 #初始化,绑定要监测的网卡的名称,比如eth0

  

2.Web 前端有 vnstatsvg,轻量,省流量,支持普通服务器,嵌入式系统还轻松支持集群。 

 

3.atop

[root@Test-Server-01 ~]# yum -y install atop.x86_64


4. Iftop


5.iotop

[root@Test-Server-01 ~]# yum -y install iotop

spacer.gif