Linux-4. Viewing network card information, status

Source: Internet
Author: User
Tags dmesg

Linux-4. viewing network card information

1. See how many network cards are available, and see the manufacturer information of the NIC Controller
Lspci | Grep-i-E--color ' network|ethernet '

Instance
[Email protected]:~# lspci |grep-i ETH
02:00.0 Ethernet controller:broadcom Corporation netxtreme II BCM5716 GigabitEthernet(Rev 20)
02:00.1 Ethernet controller:broadcom Corporation netxtreme II BCM5716 GigabitEthernet(Rev 20)
04:00.0 Ethernet controller:broadcom Corporation netxtreme II BCM5709 GigabitEthernet(Rev 20)
04:00.1 Ethernet controller:broadcom Corporation netxtreme II BCM5709 GigabitEthernet(Rev 20)
2 Card

[Email protected]:~# lspci |grep-i ETH
02:00.0 Ethernet controller:broadcom Corporation netxtreme II BCM5716 Gigabit Ethernet (rev. 20)
02:00.1 Ethernet controller:broadcom Corporation netxtreme II BCM5716 Gigabit Ethernet (rev. 20)
1 Card

2. LSHW can be used,
(The system does not have its own, you need to install Debian:apt-get installed LSHW.) Centos:yum install LSHW)
Lshw-class Network

Instance
[Email protected]:~# lshw-class Network
*-network:0
Description:ethernet interface
Product:netxtreme II BCM5716 Gigabit Ethernet
Vendor:broadcom Corporation
Physical id:0
Bus info: [Email protected]:02:00.0
Logical Name:eth0
Version:20
serial:78:2b:cb:58:74:5f
size:1gb/s
capacity:1gb/s
Width:64 bits
Clock:33mhz
CAPABILITIES:PM VPD msi msix pciexpress bus_master cap_list Ethernet physical TP 10BT 10bt-fd 100BT 100bt-fd 1000bt-fd au Tonegotiation
Configuration:autonegotiation=on broadcast=yes driver=bnx2 driverversion=2.0.2 duplex=full firmware=5.2.3 NCSI 2.0.11 ip=192.168.4.171 latency=0 link=yes multicast=yes port=twisted pair speed=1gb/s
Resources:irq:16 MEMORY:DA000000-DBFFFFFF
*-network:1 DISABLED
Description:ethernet interface
Product:netxtreme II BCM5716 Gigabit Ethernet
Vendor:broadcom Corporation
Physical id:0.1
Bus info: [Email protected]:02:00.1
Logical Name:eth1
Version:20
Serial:78:2b:cb:58:74:60
capacity:1gb/s
Width:64 bits
Clock:33mhz
CAPABILITIES:PM VPD msi msix pciexpress bus_master cap_list Ethernet physical TP 10BT 10bt-fd 100BT 100bt-fd 1000bt-fd au Tonegotiation
Configuration:autonegotiation=on broadcast=yes driver=bnx2 driverversion=2.0.2 duplex=half firmware=5.2.3 NCSI 2.0.11 Latency=0 link=no Multicast=yes port=twisted pair
Resources:irq:17 MEMORY:DC000000-DDFFFFFF

[Email protected]:~# lshw-class Network
*-network:0
Description:ethernet interface
Product:netxtreme II BCM5709 Gigabit Ethernet
Vendor:broadcom Corporation
Physical id:0
Bus info: [Email protected]:04:00.0
Logical Name:eth0
Version:20
Serial:00:10:18:b3:75:ec
size:1gb/s
capacity:1gb/s
Width:64 bits
Clock:33mhz
CAPABILITIES:PM VPD msi msix pciexpress bus_master cap_list Ethernet physical TP 10BT 10bt-fd 100BT 100bt-fd 1000bt-fd au Tonegotiation
Configuration:autonegotiation=on broadcast=yes driver=bnx2 driverversion=2.0.2 duplex=full firmware=5.2.3 ip= 192.168.4.178 latency=0 link=yes multicast=yes port=twisted pair speed=1gb/s
Resources:irq:16 MEMORY:D6000000-D7FFFFFF
*-network:1 DISABLED
Description:ethernet interface
Product:netxtreme II BCM5709 Gigabit Ethernet
Vendor:broadcom Corporation
Physical id:0.1
Bus info: [Email protected]:04:00.1
Logical Name:eth1
Version:20
Serial:00:10:18:b3:75:ee
capacity:1gb/s
Width:64 bits
Clock:33mhz
CAPABILITIES:PM VPD msi msix pciexpress bus_master cap_list Ethernet physical TP 10BT 10bt-fd 100BT 100bt-fd 1000bt-fd au Tonegotiation
Configuration:autonegotiation=on broadcast=yes driver=bnx2 driverversion=2.0.2 duplex=half firmware=5.2.3 latency=0 Link=no Multicast=yes port=twisted Pair
Resources:irq:17 MEMORY:D8000000-D9FFFFFF
*-network:0 DISABLED
Description:ethernet interface
Product:netxtreme II BCM5716 Gigabit Ethernet
Vendor:broadcom Corporation
Physical id:0
Bus info: [Email protected]:02:00.0
Logical Name:eth2
Version:20
serial:78:2b:cb:58:76:7d
capacity:1gb/s
Width:64 bits
Clock:33mhz
CAPABILITIES:PM VPD msi msix pciexpress bus_master cap_list Ethernet physical TP 10BT 10bt-fd 100BT 100bt-fd 1000bt-fd au Tonegotiation
Configuration:autonegotiation=on broadcast=yes driver=bnx2 driverversion=2.0.2 duplex=half firmware=5.2.3 NCSI 2.0.11 Latency=0 link=no Multicast=yes port=twisted pair
Resources:irq:16 MEMORY:DA000000-DBFFFFFF
*-network:1 DISABLED
Description:ethernet interface
Product:netxtreme II BCM5716 Gigabit Ethernet
Vendor:broadcom Corporation
Physical id:0.1
Bus info: [Email protected]:02:00.1
Logical Name:eth3
Version:20
serial:78:2b:cb:58:76:7e
capacity:1gb/s
Width:64 bits
Clock:33mhz
CAPABILITIES:PM VPD msi msix pciexpress bus_master cap_list Ethernet physical TP 10BT 10bt-fd 100BT 100bt-fd 1000bt-fd au Tonegotiation
Configuration:autonegotiation=on broadcast=yes driver=bnx2 driverversion=2.0.2 duplex=half firmware=5.2.3 NCSI 2.0.11 Latency=0 link=no Multicast=yes port=twisted pair
Resources:irq:17 MEMORY:DC000000-DDFFFFFF

3. View the most detailed information
LSPCI-VVV # 3 Lowercase V
Instance
[Email protected]:~# lspci-vvv | Grep-i-E ' (net|eth) '-A 50
02:00.0 Ethernet controller:broadcom Corporation netxtreme II BCM5716 Gigabit Ethernet (rev. 20)
Subsystem:dell Device 02a3
control:i/o-mem+ busmaster+ speccycle-memwinv-vgasnoop-parerr-stepping-serr-fastb2b-disintx+
status:cap+ 66mhz-udf-fastb2b-parerr-devsel=fast >tabort-<tabort-<mabort->SERR-<perr-intx-
latency:0, Cache line size:64 bytes
Interrupt:pin A routed to IRQ 16
Region 0:memory at da000000 (64-bit, non-prefetchable) [size=32m]
Capabilities: [[] Power Management version 3
---The following content is ignored, the content is too long
Kernel driver in Use:bnx2 #驱动
--
02:00.1 Ethernet controller:broadcom Corporation netxtreme II BCM5716 Gigabit Ethernet (rev. 20)
Subsystem:dell Device 02a3
control:i/o-mem+ busmaster+ speccycle-memwinv-vgasnoop-parerr-stepping-serr-fastb2b-disintx-
status:cap+ 66mhz-udf-fastb2b-parerr-devsel=fast >tabort-<tabort-<mabort->SERR-<perr-intx-
latency:0, Cache line size:64 bytes
Interrupt:pin B routed to IRQ 17
Region 0:memory at dc000000 (64-bit, non-prefetchable) [size=32m]
Capabilities: [[] Power Management version 3
---The following content is ignored, the content is too long
Kernel driver in Use:bnx2 #驱动

4. Check the current status of the NIC
Mii-tool "Usually used in the computer room after the network card connection check", cable connection, and the current transmission speed (1000BASET-FD)
Instance
[Email protected]:~# Mii-tool
eth0:negotiated 1000baset-fd flow-control, link ok
Siocgmiiphy on ' eth1 ' Failed:resource temporarily unavailable
Siocgmiiphy on ' eth2 ' Failed:resource temporarily unavailable
Siocgmiiphy on ' Eth3 ' Failed:resource temporarily unavailable

5. Check the NIC driver
Ethtool

[Email protected]:~# ethtool-i eth0
Driver:bnx2
version:2.0.2
firmware-version:5.2.3
bus-info:0000:04:00.0
[Email protected]:~# ethtool-i eth2
Driver:bnx2
version:2.0.2
firmware-version:5.2.3 NCSI 2.0.11
bus-info:0000:02:00.0

6. View the NIC from the boot information
# DMESG | Grep-i ETH
Instance
[Email protected]:/var/log# DMESG | Grep-i--color ETH
[1.162042] Broadcom netxtreme II Gigabit Ethernet Driver bnx2 v2.0.2 (21, 2009)
[1.164195] eth0:broadcom netxtreme II BCM5709 1000base-t (C0) PCI Express found at Mem d6000000, IRQ +, node addr 00 : 10:18:b3:75:ec
[1.166331] eth1:broadcom netxtreme II BCM5709 1000base-t (C0) PCI Express found at Mem d8000000, IRQ, node addr 00 : 10:18:b3:75:ee
[1.168236] eth2:broadcom netxtreme II BCM5716 1000base-t (C0) PCI Express found at Mem da000000, IRQ +, node addr 78 : 2b:cb:58:76:7d
[1.170235] eth3:broadcom netxtreme II BCM5716 1000base-t (C0) PCI Express found at Mem dc000000, IRQ, node addr 78 : 2b:cb:58:76:7e
[12.021967] ACPI Error (psparse-0537): Method parse/execution failed [\_sb_. PMI0._GHL] (Node ffff88023fc2bd40), ae_not_exist
[12.021981] ACPI Error (psparse-0537): Method parse/execution failed [\_sb_. PMI0._PMC] (Node ffff88023fc2bcc0), ae_not_exist
[41.295829] bnx2:eth0:using Msix
[41.296444] Addrconf (NETDEV_UP): Eth0:link is isn't ready
[44.413942] Bnx2:eth0 NIC Copper Link is up, + Mbps full Duplex
[44.414627] Addrconf (netdev_change): Eth0:link becomes ready


===========================
Mii-tool,ethtool Detailed description
and/proc/net/dev
/proc/interrupts | grep EthX
Virtual network card
Modification of NIC Parameters
View of network card traffic
Will be later in the next article said

The above is a personal point of summary and understanding, the level is not high, the level of writing is very bad, please greatly forgive me.
Can exchange learning together.

My qq:610851588.
Can join my build group (now very few people, hope slowly more up)
Linux Clusters: 183932302
Python, Shell AC Group: 469094734


This article from the "Go to the Origin dimension" blog, reproduced please contact the author!

Linux-4. Viewing network card information, status

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.