Linux操作系统查看网卡驱动
操作方法
- 01
如果有一天,你想查看自己linux系统的网卡驱动版本,以此决定是否升级驱动,那你该怎么查看哪? 首先,用dmesg找驱动模块名称,下文中的eth0卡没启用,所以搜不到有用信息,而eth1启用了,就能查到模块名称。下文中bnx2(Broadcom NetXtreme II)就是模块名称。 [root@ak-2-1 ~]# dmesg |grep eth0 eth0: Broadcom NetXtreme II BCM5709 1000Base-T (B2) PCI-X 64-bit 133MHz found at mem f8000000, IRQ 169, node addr 002219c6b040 [root@ak-2-1 ~]# dmesg |grep eth1 eth1: Broadcom NetXtreme II BCM5709 1000Base-T (B2) PCI-X 64-bit 133MHz found at mem f4000000, IRQ 169, node addr 002219c6b042 bnx2: eth1: using MSI bnx2: eth1 NIC Copper Link is Up, 1000 Mbps full duplex eth1: no IPv6 routers present bnx2: eth1 NIC Copper Link is Down bnx2: eth1 NIC Copper Link is Up, 1000 Mbps full duplex bnx2: eth1 NIC Copper Link is Down bnx2: eth1 NIC Copper Link is Up, 1000 Mbps full duplex bnx2: eth1 NIC Copper Link is Down bnx2: eth1 NIC Copper Link is Up, 1000 Mbps full duplex bnx2: eth1 NIC Copper Link is Down bnx2: eth1 NIC Copper Link is Up, 1000 Mbps full duplex 复制代码然后使用modinfo查看这个模块的信息,version部分就是网卡的版本号了。 [root@ak-2-1 ~]# modinfo bnx2 filename: /lib/modules/2.6.xx-xx.el5/kernel/drivers/net/bnx2.ko version: 1.6.9 license: GPL description: Broadcom NetXtreme II BCM5706/5708 Driver author: Michael Chan <mchan@broadcom.com> srcversion: E96C6B074D0784C3292BDA4 alias: pci:v000014E4d0000163Asv*sd*bc*sc*i* alias: pci:v000014E4d00001639sv*sd*bc*sc*i* alias: pci:v000014E4d000016ACsv*sd*bc*sc*i* alias: pci:v000014E4d000016AAsv*sd*bc*sc*i* alias: pci:v000014E4d000016AAsv0000103Csd00003102bc*sc*i* alias: pci:v000014E4d0000164Csv*sd*bc*sc*i* alias: pci:v000014E4d0000164Asv*sd*bc*sc*i* alias: pci:v000014E4d0000164Asv0000103Csd00003106bc*sc*i* alias: pci:v000014E4d0000164Asv0000103Csd00003101bc*sc*i* depends: vermagic: 2.6.xx-xx.el5 SMP mod_unload gcc-4.1 parm: disable_msiisable Message Signaled Interrupt (MSI) (int) module_sig: 883f350484fa8d052394a11b61a91112bcc209f4cba598244286f4b20e7e1da7de4fe9a36fdce7f0a0a83649b2127c40ad62faf97f41c5f7956d 复制代码 PS:系统识别到的网卡可能和实际版本不太一致,比如说上文中提到网卡的版本是“ BCM5709”,而利用服务器硬件编号在戴尔官方那里查到的是“ BCM5709c”。各位朋友可能要小心一点,有官方可靠数据来源,就不要太相信自己的眼睛。