1 问题
在1台服务器上有2张网卡:p4p1、p6p1,一张网卡的位宽为x2,一张为x8。如何确认它们各自的位宽呢?
2 排查步骤
1.1 使用ethtool查看网卡id
通过如下信息可以看到:
- p4p1的id为:bus-info: 0000:82:00.0
- p6p1的id为:bus-info: 0000:04:00.0
[root@localhost ops]# ethtool -i p4p1
driver: ixgbe
version: 5.1.0-k
firmware-version: 0x5e110001
expansion-rom-version:
bus-info: 0000:82:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: yes
[root@localhost ops]# ethtool -i p6p1
driver: ixgbe
version: 5.1.0-k
firmware-version: 0x5e110001
expansion-rom-version:
bus-info: 0000:04:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: yes
1.2 使用lspci查看网卡位宽信息
从下面的信息可以得到:
- p4p1(82:00.0)的位宽为:Width x2
- p6p1(04:00.0)的位宽为:Width x8
[root@localhost ops]# lspci -s 04:00.0 -vvv | grep -i wid
LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s, Exit Latency L0s <1us, L1 <8us
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 5GT/s, Width x8, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
[root@localhost ops]# lspci -s 82:00.0 -vvv | grep -i wid
LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s, Exit Latency L0s <1us, L1 <8us
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 5GT/s, Width x2, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-