linux下查看网卡信息的命令

rhel 内核版本信息:

[html]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. [root@hvrhub ~]# uname -a  
  2. 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  

 

查看网卡的驱动,制造商等信息:

[html]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. [root@hvrhub ~]# kudzu --probe --class=network  
  2. -  
  3. class: NETWORK  
  4. bus: PCI  
  5. detached: 0  
  6. device: eth0  
  7. driver: r8169 ---------------->这是驱动名称,下面的modinfo命令会用到该驱动名称。  
  8. desc: "Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller"  
  9. network.hwaddr: 20:cf:30:8f:5a:cf  
  10. vendorId: 10ec  
  11. deviceId: 8136  
  12. subVendorId: 1043  
  13. subDeviceId: 8347  
  14. pciType: 1  
  15. pcidom:    0  
  16. pcibus:  1  
  17. pcidev:  0  
  18. pcifn:  0  
  19. [root@hvrhub ~]#   

下面是查看网卡的网速:

[html]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. [root@hvrhub ~]# ethtool eth0  
  2. Settings for eth0:  
  3.         Supported ports: [ TP MII ]  
  4.         Supported link modes:   10baseT/Half 10baseT/Full   
  5.                                 100baseT/Half 100baseT/Full   
  6.         Supports auto-negotiation: Yes  
  7.         Advertised link modes:  10baseT/Half 10baseT/Full   
  8.                                 100baseT/Half 100baseT/Full   
  9.         Advertised auto-negotiation: Yes  
  10.         Speed: 100Mb/s  ------------------------------------>网卡速度  
  11.         Duplex: Full  
  12.         Port: MII  
  13.         PHYAD: 0  
  14.         Transceiver: internal  
  15.         Auto-negotiation: on  
  16.         Supports Wake-on: pumbg  
  17.         Wake-on: g  
  18.         Current message level: 0x00000033 (51)  
  19.         Link detected: yes  

下面是查看网卡驱动的详细信息

[html]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. [root@hvrhub ~]# modinfo r8169  
  2. filename:       /lib/modules/2.6.18-308.el5/kernel/drivers/net/r8169.ko  
  3. version:        2.3LK-1-NAPI  
  4. license:        GPL  
  5. description:    RealTek RTL-8169 Gigabit Ethernet driver  
  6. author:         Realtek and the Linux r8169 crew <netdev@vger.kernel.org>  
  7. srcversion:     2F438BE7BC0FF431B08F6F4  
  8. alias:          pci:v00000001d00008168sv*sd00002410bc*sc*i*  
  9. alias:          pci:v00001737d00001032sv*sd00000024bc*sc*i*  
  10. alias:          pci:v000016ECd00000116sv*sd*bc*sc*i*  
  11. alias:          pci:v00001259d0000C107sv*sd*bc*sc*i*  
  12. alias:          pci:v00001186d00004300sv*sd*bc*sc*i*  
  13. alias:          pci:v000010ECd00008169sv*sd*bc*sc*i*  
  14. alias:          pci:v000010ECd00008168sv*sd*bc*sc*i*  
  15. alias:          pci:v000010ECd00008167sv*sd*bc*sc*i*  
  16. alias:          pci:v000010ECd00008136sv*sd*bc*sc*i*  
  17. alias:          pci:v000010ECd00008129sv*sd*bc*sc*i*  
  18. depends:        mii  
  19. vermagic:       2.6.18-308.el5 SMP mod_unload gcc-4.1  
  20. parm:           rx_copybreak:Copy breakpoint for copy-only-tiny-frames (int)  
  21. parm:           use_dac:Enable PCI DAC. Unsafe on 32 bit PCI slot. (int)  
  22. parm:           debug:Debug verbosity level (0=none, ..., 16=all) (int)  
  23. module_sig:     883f3504f23243d2d3142b3e704051112e6b709e3b544a3e206c72e140c0edbb9629d3b31086569609f535d83d8f076749cbfa5d34d39be5319c1cc321  

 

如下命令能看出来是不是集成网卡?---有待验证。 

[html]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. [root@hvrhub ~]# dmidecode | sed -n '/net/,+5p'  
  2.         Type: Ethernet  
  3.         Status: Enabled  
  4.         Description:  Onboard Ethernet  ------------------->这个意思是不是说这是集成网卡?有机会的话,弄个pci网卡上去,再执行此命令看看是啥输出。  
  5.   
  6. Handle 0x0020, DMI type 11, 5 bytes  
  7. OEM Strings  

下面的命令也能看出网卡控制器的制造商信息。

[html]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. [root@hvrhub ~]# lspci | grep Ethernet  
  2. 01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 02)  
  3. [root@hvrhub ~]#   

 

查看网卡网速的另外一个命令:

[html]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. [root@testb .vnc]# ethtool -i eth0  
  2. driver: r8169  
  3. version: 2.3LK-1-NAPI  
  4. firmware-version:   
  5. bus-info: 0000:03:00.0  
  6. [root@testb .vnc]# ethtool -i eth1  
  7. driver: r8169  
  8. version: 2.3LK-1-NAPI  
  9. firmware-version:   
  10. bus-info: 0000:04:06.0  
  11. [root@testb .vnc]#  
  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值