设为首页收藏本站

ZMX - IT技术交流论坛 - 无限Perfect,追求梦想 - itzmx.com

 找回密码
 注册论坛

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

用百度帐号登录

只需两步,快速登录

搜索
查看: 130|回复: 1

linux centos查看网卡信息的方法,安装pciutils使用lspci命令,KVM虚拟化网络性能定义SR-IOV > Virtio > 模拟卡

[复制链接]
 成长值: 28140

签到天数: 3675 天

[LV.Master]伴坛终老

发表于 2022/1/1 23:05 | 显示全部楼层 |阅读模式 |Google Chrome 96.0.4664.110|Windows 10
天涯海角搜一下: 百度 谷歌 360 搜狗 有道 雅虎 必应 即刻
linux centos查看网卡信息的方法,安装pciutils使用lspci命令,KVM虚拟化网络性能定义SR-IOV > Virtio > 模拟卡

  1. yum -y install pciutils
复制代码


查看基本信息:
  1. lspci
复制代码

模拟卡显示为
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:01.2 USB controller: Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II] (rev 01)
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
00:02.0 VGA compatible controller: Cirrus Logic GD 5446
00:03.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 03)
00:04.0 RAM memory: Red Hat, Inc. Virtio memory balloon

Virtio显示为
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:01.2 USB controller: Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II] (rev 01)
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
00:02.0 VGA compatible controller: Cirrus Logic GD 5446
00:03.0 Ethernet controller: Red Hat, Inc. Virtio network device
00:04.0 SCSI storage controller: Red Hat, Inc. Virtio block device
00:05.0 Unclassified device [00ff]: Red Hat, Inc. Virtio memory balloon
00:06.0 Unclassified device [00ff]: Red Hat, Inc. Virtio RNG

查看详细信息:
  1. lspci -vvv
复制代码

查看网卡信息:
  1. lspci | grep Ethernet
复制代码

模拟卡显示为
00:03.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 03)

Virtio显示为
00:03.0 Ethernet controller: Red Hat, Inc. Virtio network device


查看网卡驱动版本
  1. lshw -c network -businfo
复制代码

模拟卡显示为
Bus info          Device      Class      Description
====================================================
pci@0000:00:03.0  ens3        network    82540EM Gigabit Ethernet Controller

Virtio显示为
Bus info          Device      Class      Description
====================================================
pci@0000:00:03.0              network    Virtio network device
virtio@0          eth0        network    Ethernet interface

  1. ethtool -i eth0
复制代码

模拟卡显示为
driver: e1000
version: 7.3.21-k8-NAPI
firmware-version:
expansion-rom-version:
bus-info: 0000:00:03.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: no

Virtio显示为
driver: virtio_net
version: 1.0.0
firmware-version:
expansion-rom-version:
bus-info: 0000:00:03.0
supports-statistics: no
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no

查看是否支持SR-IOV(00:03.0字符串通过lspci | grep Ethernet 命令获取)
  1. lspci -s 00:03.0 -vvv | grep -i "modules"
复制代码

输出e1000代表是模拟卡,输出virtio_pci代表是Virtio

性能区别,网络性能定义在 SR-IOV > Virtio > 模拟卡:https://bbs.itzmx.com/thread-99381-1-1.html
参考:https://www.linux-kvm.org/page/10G_NIC_performance:_VFIO_vs_virtio
https://www.juniper.net/documentation/en_US/junos/topics/concept/disaggregated-junos-virtio-sr-iov.html

欢迎光临IT技术交流论坛:http://bbs.itzmx.com/
回复

使用道具 举报

 成长值: 28140

签到天数: 3675 天

[LV.Master]伴坛终老

发表于 2022/1/9 02:28 | 显示全部楼层 |Google Chrome 97.0.4692.71|Windows 10
补一张hyper的
lspci -vvv
  1. 00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (AGP disabled) (rev 03)
  2.         Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
  3.         Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
  4.         Latency: 0

  5. 00:07.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 01)
  6.         Subsystem: Microsoft Corporation Device 0000
  7.         Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
  8.         Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
  9.         Latency: 0

  10. 00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01) (prog-if 80 [ISA Compatibility mode-only controller, supports bus mastering])
  11.         Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
  12.         Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
  13.         Latency: 0
  14.         Region 0: [virtual] Memory at 000001f0 (32-bit, non-prefetchable) [size=8]
  15.         Region 1: [virtual] Memory at 000003f0 (type 3, non-prefetchable)
  16.         Region 2: [virtual] Memory at 00000170 (32-bit, non-prefetchable) [size=8]
  17.         Region 3: [virtual] Memory at 00000370 (type 3, non-prefetchable)
  18.         Region 4: I/O ports at ffa0 [size=16]
  19.         Kernel driver in use: ata_piix
  20.         Kernel modules: ata_generic, pata_acpi, ata_piix

  21. 00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 02)
  22.         Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
  23.         Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
  24.         Interrupt: pin A routed to IRQ 9
  25.         Kernel modules: i2c-piix4

  26. 00:08.0 VGA compatible controller: Microsoft Corporation Hyper-V virtual VGA (prog-if 00 [VGA controller])
  27.         Control: I/O+ Mem+ BusMaster+ SpecCycle+ MemWINV+ VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
  28.         Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
  29.         Latency: 0
  30.         Interrupt: pin A routed to IRQ 11
  31.         Region 0: Memory at f8000000 (32-bit, non-prefetchable) [size=64M]
  32.         Expansion ROM at <unassigned> [disabled]
  33.         Kernel driver in use: hyperv_fb
  34.         Kernel modules: hyperv_fb
复制代码

ethtool -i eth0
driver: hv_netvsc
version: 3.1
firmware-version: N/A
bus-info:
supports-statistics: no
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no
欢迎光临IT技术交流论坛:http://bbs.itzmx.com/
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册论坛 新浪微博账号登陆用百度帐号登录

本版积分规则

手机版|Archiver|Mail me|网站地图|IT技术交流论坛 ( 闽ICP备13013206号-7 )

GMT+8, 2022/1/25 10:38 , Processed in 0.498889 second(s), 19 queries , MemCache On.

Powered by itzmx! X3.4

© 2011- sakura

快速回复 返回顶部 返回列表