1、ethtool
ethtool 网络接口名
#ethtool em4(网络接口名)
Settings for em4:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
MDI-X: Unknown
Supports Wake-on: g
Wake-on: d
Link detected: yes
2、查看网卡实际通讯速率
dmesg | grep eth0
这个命令可以列出网卡工作速率。看到 Up 1000Mps full duplex 就知道是千兆网卡了。
(这里 eth0是网卡的设备名,不同机器名称可能不同。可以用ifconfig 查看自己网卡的设备名