linux下如何查看网卡驱动版本信息?
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux下如何查看网卡驱动版本信息?相关的知识,希望对你有一定的参考价值。
Linux下查看网卡驱动和版本信息查看网卡生产厂商和信号
查看基本信息:lspci
查看详细信息:lspci -vvv # 3个小写的v
查看网卡信息:lspci | grep Ethernet
查看网卡驱动
查看网卡驱动信息:lspci -vvv # 找到网卡设备的详细信息,包括网卡驱动
# lsmod 列出加载的所有驱动,包括网卡驱动
查看网卡驱动版本
查看模块信息:modifo<module name> # 其中包含version信息
或 # ethtool-i <device name>
RHEL 6.3中的网卡驱动版本:
# modinfo igb
filename: /lib/modules/2.6.32-279.el6.x86_64/kernel/drivers/net/igb/igb.ko
version: 3.2.10-k
license: GPL
description: Intel(R) Gigabit Ethernet Network Driver
# modinfo e1000e
filename: /lib/modules/2.6.32-279.el6.x86_64/kernel/drivers/net/e1000e/e1000e.ko
version: 1.9.5-k
license: GPL
description: Intel(R) PRO/1000 Network Driver
author: Intel Corporation,<linux.nics@intel.com>
# modinfo e1000
filename: /lib/modules/2.6.32-279.el6.x86_64/kernel/drivers/net/e1000/e1000.ko
version: 8.0.35-NAPI
license: GPL
description: Intel(R) PRO/1000 Network Driver
# modinfo ixgbe
filename: /lib/modules/2.6.32-279.el6.x86_64/kernel/drivers/net/ixgbe/ixgbe.ko
version: 3.6.7-k
license: GPL
description: Intel(R) 10 Gigabit PCI Express NetworkDriver
# modinfo r8169
filename: /lib/modules/2.6.32-279.el6.x86_64/kernel/drivers/net/r8169.ko
version: 2.3LK-NAPI
license: GPL
description: RealTek RTL-8169 Gigabit Ethernet driver
查看网络接口队列数
查看网卡接口的中断信息:#cat /proc/interrupts | grep eth0
或 # ethtool-S eth0
查看网卡驱动源码的版本号
解压Intel网卡驱动源码,打开解压缩目录下的*.spec文件查看驱动的版本。
例如:解压e1000-8.0.35.tar.gz网卡驱动后,查看e1000.spec文件。
Name:e1000
Summary:Intel(R) Gigabit Ethernet Connection
Version: 8.0.35
Release:1
Source:%name-%version.tar.gz
Vendor:Intel Corporation
License:GPL
ExclusiveOS:linux
Group:System Environment/Kernel
在驱动源码src目录中查找:
#grep DRV_VERSION * # forLinux
#findstr DRV_VERSION * # for Windows
在e1000_main.c中也能找到定义驱动版本的一行:
#define DRV_VERSION"8.0.35" DRV_NAPI DRV_DEBUG DRV_HW_PERF
在e1000e中src目录下netdev.c文件:
#define DRV_VERSION"3.0.4.1" DRV_EXTRAVERSION
igb_main.c:
#define MAJ 5
#define MIN 2
#define BUILD 9.4
#define DRV_VERSION__stringify(MAJ) "." __stringify(MIN) "."\
ixgbe_main.c:
#define DRV_VERSION __stringify(3.22.3) DRIVERIOVDRV_HW_PERF FP GA \ 参考技术A 通常,linux系统启动的时候当加载网卡的时候,会产生一条日志信息写道/var/log/messages或者dmesg里面,这里面就有比较详细的网卡信息,包括版本号码等。本回答被提问者采纳
linux下查看网卡信息的命令
rhel 内核版本号信息:
[[email protected] ~]# uname -a Linux hvrhub 2.6.18-308.el5 #1 SMP Fri Jan 27 17:17:51 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
查看网卡的驱动。制造商等信息:
[[email protected] ~]# kudzu --probe --class=network - class: NETWORK bus: PCI detached: 0 device: eth0 driver: r8169 ---------------->这是驱动名称,以下的modinfo命令会用到该驱动名称。 desc: "Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller" network.hwaddr: 20:cf:30:8f:5a:cf vendorId: 10ec deviceId: 8136 subVendorId: 1043 subDeviceId: 8347 pciType: 1 pcidom: 0 pcibus: 1 pcidev: 0 pcifn: 0 [[email protected] ~]#
以下是查看网卡的网速:
[[email protected] ~]# ethtool eth0 Settings for eth0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised auto-negotiation: Yes Speed: 100Mb/s ------------------------------------>网卡速度 Duplex: Full Port: MII PHYAD: 0 Transceiver: internal Auto-negotiation: on Supports Wake-on: pumbg Wake-on: g Current message level: 0x00000033 (51) Link detected: yes
以下是查看网卡驱动的具体信息
[[email protected] ~]# modinfo r8169 filename: /lib/modules/2.6.18-308.el5/kernel/drivers/net/r8169.ko version: 2.3LK-1-NAPI license: GPL description: RealTek RTL-8169 Gigabit Ethernet driver author: Realtek and the Linux r8169 crew <[email protected]> srcversion: 2F438BE7BC0FF431B08F6F4 alias: pci:v00000001d00008168sv*sd00002410bc*sc*i* alias: pci:v00001737d00001032sv*sd00000024bc*sc*i* alias: pci:v000016ECd00000116sv*sd*bc*sc*i* alias: pci:v00001259d0000C107sv*sd*bc*sc*i* alias: pci:v00001186d00004300sv*sd*bc*sc*i* alias: pci:v000010ECd00008169sv*sd*bc*sc*i* alias: pci:v000010ECd00008168sv*sd*bc*sc*i* alias: pci:v000010ECd00008167sv*sd*bc*sc*i* alias: pci:v000010ECd00008136sv*sd*bc*sc*i* alias: pci:v000010ECd00008129sv*sd*bc*sc*i* depends: mii vermagic: 2.6.18-308.el5 SMP mod_unload gcc-4.1 parm: rx_copybreak:Copy breakpoint for copy-only-tiny-frames (int) parm: use_dac:Enable PCI DAC. Unsafe on 32 bit PCI slot. (int) parm: debug:Debug verbosity level (0=none, ..., 16=all) (int) module_sig: 883f3504f23243d2d3142b3e704051112e6b709e3b544a3e206c72e140c0edbb9629d3b31086569609f535d83d8f076749cbfa5d34d39be5319c1cc321
例如以下命令能看出来是不是集成网卡?---有待验证。
[[email protected] ~]# dmidecode | sed -n ‘/net/,+5p‘ Type: Ethernet Status: Enabled Description: Onboard Ethernet ------------------->这个意思是不是说这是集成网卡?有机会的话,弄个pci网卡上去,再运行此命令看看是啥输出。 Handle 0x0020, DMI type 11, 5 bytes OEM Strings
以下的命令也能看出网卡控制器的制造商信息。
[[email protected] ~]# lspci | grep Ethernet 01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 02) [[email protected] ~]#
查看网卡网速的另外一个命令:
[[email protected] .vnc]# ethtool -i eth0 driver: r8169 version: 2.3LK-1-NAPI firmware-version: bus-info: 0000:03:00.0 [[email protected] .vnc]# ethtool -i eth1 driver: r8169 version: 2.3LK-1-NAPI firmware-version: bus-info: 0000:04:06.0 [[email protected] .vnc]#
以上是关于linux下如何查看网卡驱动版本信息?的主要内容,如果未能解决你的问题,请参考以下文章