例如我们要查看博通网卡的驱动版本,如果该机器上刚好是博通的网卡,最简单的方法就是
ethtool -i eth0
但如果我们所查看的机器用的不是博通的网卡,则可以通过以下方法查看
我们知道博通网卡的驱动文件名叫bnx2.ko
我们查找下bnx2.ko的位置
updatedb
locate bnx2.ko
结果如下
/lib/modules/2.6.32-71.el6.x86_64/kernel/drivers/net/bnx2.ko
查看驱动详细情况
modinfo /lib/modules/2.6.32-71.el6.x86_64/kernel/drivers/net/bnx2.ko
以下信息中,version记录就是我们的网卡驱动版本,是2.0.8-j15
filename: /lib/modules/2.6.32-71.el6.x86_64/kernel/drivers/net/bnx2.ko
firmware: bnx2/bnx2-rv2p-09ax-5.0.0.j10.fw
firmware: bnx2/bnx2-rv2p-09-5.0.0.j10.fw
firmware: bnx2/bnx2-mips-09-5.0.0.j15.fw
firmware: bnx2/bnx2-rv2p-06-5.0.0.j3.fw
firmware: bnx2/bnx2-mips-06-5.0.0.j6.fw
version: 2.0.8-j15
license: GPL
description: Broadcom NetXtreme II BCM5706/5708/5709/5716 Driver
author: Michael Chan
srcversion: 8CDA41B3E0DF70A112FBA80
alias: pci:v000014E4d0000163Csv*sd*bc*sc*i*
alias: pci:v000014E4d0000163Bsv*sd*bc*sc*i*
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.32-71.el6.x86_64 SMP mod_unload modversions
parm: disable_msi:Disable Message Signaled Interrupt (MSI) (int)