linux 如何查看网卡带宽

linux | 2020-02-13 16:02:26

1.先查看网卡

# ifconfig
docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        inet6 fe80::42:acff:fe45:985  prefixlen 64  scopeid 0x20<link>
        ether 02:42:ac:45:09:85  txqueuelen 0  (Ethernet)
        RX packets 141370815  bytes 100379736898 (93.4 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 140997320  bytes 61931276928 (57.6 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eno16777984: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.10.22.175  netmask 255.255.255.0  broadcast 10.10.22.255
        inet6 fe80::250:56ff:fe8b:469e  prefixlen 64  scopeid 0x20<link>
        ether 00:50:56:8b:46:9e  txqueuelen 1000  (Ethernet)
        RX packets 443262260  bytes 377347425802 (351.4 GiB)
        RX errors 0  dropped 489  overruns 0  frame 0
        TX packets 234458160  bytes 423618667541 (394.5 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

...

2.查看指定网卡带宽

# sudo ethtool eno16777984
Settings for eno16777984:
	Supported ports: [ TP ]
	Supported link modes:   1000baseT/Full 
	                        10000baseT/Full 
	Supported pause frame use: No
	Supports auto-negotiation: No
	Advertised link modes:  Not reported
	Advertised pause frame use: No
	Advertised auto-negotiation: No
	Speed: 10000Mb/s
	Duplex: Full
	Port: Twisted Pair
	PHYAD: 0
	Transceiver: internal
	Auto-negotiation: off
	MDI-X: Unknown
	Supports Wake-on: uag
	Wake-on: d
	Link detected: yes

查看speed,表示为万兆网卡!

登录后即可回复 登录 | 注册
    
关注编程学问公众号