查看网卡名称: ifconfig
royakon@hwsrv-832112:~$ ifconfig
ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 104.168.246.44 netmask 255.255.255.0 broadcast 104.168.246.255
inet6 2607:5501:3000:b43::2 prefixlen 48 scopeid 0x0<global>
inet6 fe80::f816:3eff:fe0c:120c prefixlen 64 scopeid 0x20<link>
ether fa:16:3e:0c:12:0c txqueuelen 1000 (Ethernet)
RX packets 1940937177 bytes 124485942561 (124.4 GB)
RX errors 0 dropped 3 overruns 0 frame 0
TX packets 4200481 bytes 7259596072 (7.2 GB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 1798638 bytes 6886467340 (6.8 GB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1798638 bytes 6886467340 (6.8 GB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
1. nethogs
nethogs可以查看实时进程网络占用
royakon@hwsrv-832112:~$ sudo apt-get install nethogs
royakon@hwsrv-832112:~$ sudo nethogs ens3
2. ethstatus
ethstatus可以监控实时的网卡带宽占用
royakon@hwsrv-832112:~$ sudo apt-get install ethstatus
royakon@hwsrv-832112:~$ sudo ethstatus -i ens3