iftop命令 – 用于查看套接字及进程的网络利用率,是实时流量监控工具
语法格式:iftop [参数]
监控第一块网卡的流量:
[root@os-client ~]# iftop
interface: eth0
IP address is: 192.168.0.56
MAC address is: fa:16:3e:19:71:a9
12.5Kb 25.0Kb 37.5Kb 50.0Kb 62.5Kb
mqqqqqqqqqqqqqqqqqqvqqqqqqqqqqqqqqqqqqvqqqqqqqqqqqqqqqqqqvqqqqqqqqqqqqqqqqqqvqqqqqqqqqqqqqqqqqqq
os-client => 100.125.143.99 22.3Kb 4.45Kb 1.11Kb
<= 30.4Kb 6.08Kb 1.52Kb
os-client => 112.97.204.225 2.86Kb 3.05Kb 1.90Kb
<= 160b 160b 199b
os-client => 100.125.136.29 876b 1.22Kb 401b
<= 1.70Kb 1.57Kb 556b
os-client => 140.249.61.132 0b 538b 168b
<= 0b 538b 168b
os-client => 100.125.1.250 664b 308b 77b
<= 552b 317b 79b
os-client => ec2-54-177-198-191.us-west-1.comp 0b 67b 17b
<= 0b 67b 17b
os-client => ec2-54-193-155-108.us-west-1.comp 0b 67b 17b
<= 0b 67b 17b
os-client => ec2-54-224-28-54.compute-1.amazon 0b 29b 7b
<= 0b 29b 7b
os-client => ec2-44-197-181-213.compute-1.amaz 0b 29b 7b
<= 0b 29b 7b
os-client => ec2-18-234-238-158.compute-1.amaz 0b 29b 7b
<= 0b 29b 7b
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
TX: cum: 20.3KB peak: 26.6Kb rates: 26.6Kb 9.94Kb 3.91Kb
RX: 14.0KB 32.8Kb 32.8Kb 9.03Kb 2.78Kb
TOTAL: 34.2KB 59.4Kb 59.4Kb 19.0Kb 6.68Kb
监控eth0网卡流量,显示IP, 不进行DNS反解析
[root@os-client ~]# iftop -n
interface: eth0
IP address is: 192.168.0.56
MAC address is: fa:16:3e:19:71:a9
12.5Kb 25.0Kb 37.5Kb 50.0Kb 62.5Kb
mqqqqqqqqqqqqqqqqqqvqqqqqqqqqqqqqqqqqqvqqqqqqqqqqqqqqqqqqvqqqqqqqqqqqqqqqqqqvqqqqqqqqqqqqqqqqqqq
192.168.0.56 => 112.97.204.225 2.97Kb 3.08Kb 3.08Kb
<= 320b 267b 267b
192.168.0.56 => 110.41.190.143 0b 0b 0b
<= 0b 120b 120b
192.168.0.56 => 16.16.207.187 0b 48b 48b
<= 0b 48b 48b
192.168.0.56 => 16.171.24.239 0b 48b 48b
<= 0b 48b 48b
192.168.0.56 => 13.50.224.21 0b 48b 48b
<= 0b 48b 48b
192.168.0.56 => 100.26.240.219 0b 48b 48b
<= 0b 48b 48b
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
TX: cum: 2.45KB peak: 3.53Kb rates: 2.97Kb 3.27Kb 3.27Kb
RX: 434B 896b 320b 579b 579b
TOTAL: 2.87KB 4.41Kb 3.28Kb 3.83Kb 3.83Kb
监控指定网卡eth0的流量
[root@os-client ~]# iftop -i eth0
interface: eth0
IP address is: 192.168.0.56
MAC address is: fa:16:3e:19:71:a9
12.5Kb 25.0Kb 37.5Kb 50.0Kb 62.5Kb
mqqqqqqqqqqqqqqqqqqvqqqqqqqqqqqqqqqqqqvqqqqqqqqqqqqqqqqqqvqqqqqqqqqqqqqqqqqqvqqqqqqqqqqqqqqqqqqq
os-client => 112.97.204.225 1.05Kb 1.44Kb 1.70Kb
<= 160b 192b 213b
os-client => 100.125.136.29 0b 174b 145b
<= 0b 306b 255b
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
TX: cum: 2.76KB peak: 3.00Kb rates: 1.05Kb 1.61Kb 1.84Kb
RX: 702B 1.80Kb 160b 498b 468b
TOTAL: 3.44KB 4.80Kb 1.20Kb 2.10Kb 2.30Kb
因篇幅问题不能全部显示,请点此查看更多更全内容