zoukankan      html  css  js  c++  java
  • 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

    版权声明:本文博主原创文章。博客,未经同意不得转载。

  • 相关阅读:
    jquery实现表格文本框淡入更改值后淡出
    硬件抽象层
    第八章读书笔记
    Linux驱动——LED闪烁
    编写Linux驱动与统计单词个数
    在开发板上安装Android
    源代码的下载和编译
    初学Git随笔
    Ubuntu Linux环境下的Android开发环境的配置
    Android系统移植于驱动开发概述
  • 原文地址:https://www.cnblogs.com/hrhguanli/p/4803532.html
Copyright © 2011-2022 走看看