步骤1:查看网卡名称
1.使用ifconfig
命令查看网卡信息:
ifconfig
你会看到类似以下的输出:
eth0 Link encap:Ethernet HWaddr 00:11:22:33:44:55
inet addr:192.168.31.1 Bcast:192.168.31.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:123456 errors:0 dropped:0 overruns:0 frame:0
TX packets:123456 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:123456789 (123.4 MB) TX bytes:123456789 (123.4 MB)
步骤2:使用iftop
监控网络流量
2.使用iftop
命令并指定网卡名称(例如eth0
):
iftop -i eth0
以下是iftop
的输出示例:
10.0.0.1 => 10.0.0.2 1.50Mb 1.50Mb 1.50Mb
10.0.0.1 <= 10.0.0.2 1.50Mb 1.50Mb 1.50Mb
10.0.0.1 => 10.0.0.3 0.50Mb 0.50Mb 0.50Mb
10.0.0.1 <= 10.0.0.3 0.50Mb 0.50Mb 0.50Mb
10.0.0.1 => 10.0.0.4 0.25Mb 0.25Mb 0.25Mb
10.0.0.1 <= 10.0.0.4 0.25Mb 0.25Mb 0.25Mb
标签:10.0,软件应用,Mb,0.1,iftop,网卡,linux,0.50
From: https://www.cnblogs.com/lingyao/p/18621481