CentOS, RHEL, Displaying hardware, OS, module (driver) & firmware levels


The following Linux commands can be used to display important software information:
  • Redhat OS release level
  • Linux kernel level
  • Detailed hardware information
  • Adapter
    • module (driver) information
    • firmware information
    • slot information
    • device name information

Displaying hardware information

Note: it maybe necessary to install lshw using “yum install lshw”

Displaying hardware information:
# lshw -class network
Displaying only network adapter information:
# lshw -class network

 *-network:0
 description: Ethernet interface
 product: I350 Gigabit Network Connection
 vendor: Intel Corporation
 physical id: 0
 bus info: pci@0000:06:00.0
 logical name: eth0 <--------------------- Device Name
 version: 01
 serial: 40:f2:e9:2a:06:12 <-------------- MAC Address
 capacity: 1Gbit/s
 width: 32 bits
 clock: 33MHz
 capabilities: pm msi msix pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
 configuration: autonegotiation=on broadcast=yes driver=igb driverversion=5.2.15-k firmware=1.63, 0x800009fa latency=0 link=no multicast=yes port=twisted pair
 resources: irq:16 memory:c4580000-c459ffff ioport:6f80(size=32) memory:c4570000-c4573fff memory:c6100000-c611ffff(prefetchable) memory:c6120000-c613ffff(prefetchable)

Displaying OS release level
# cat /etc/redhat-release
 Red Hat Enterprise Linux Server release 6.6 (Santiago)

Displaying OS kernel level

# uname -a
 Linux 2.6.32-504.el6.x86_64 #1 SMP Tue Sep 16 01:56:35 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux

Display ethernet network adapter(s)

# lspci | grep -wi --color 'ethernet\|network'
 07:00.0 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
 07:00.1 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
 07:00.2 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
 0f:00.0 Network controller: Mellanox Technologies MT27500 Family [ConnectX-3]

The server used in this example has two network adapters. An Intel adapter in slot 07:00 and a Mellanox adapter in slot 0f:00.

Display kernel modules (drivers) loaded by Mellanox Network controller

Let’s query additional information about the adapter card in slot 0f:00 –

# lspci -vv -s 0f:00.0
 0f:00.0 Network controller: Mellanox Technologies MT27500 Family [ConnectX-3]
 Subsystem: Mellanox Technologies Device 0024
 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 34
 Region 0: Memory at a9300000 (64-bit, non-prefetchable) [size=1M]
 Region 2: Memory at ab800000 (64-bit, prefetchable) [size=8M]
 Expansion ROM at <ignored> [disabled]
 Capabilities: [40] Power Management version 3
 Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
 Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
 Capabilities: [48] Vital Product Data
 Product Name: Mellanox CX3 VPI Adapter
 Read-only fields:
 [PN] Part number: 00D9551
 [EC] Engineering changes: A2
 [SN] Serial number: 00D9551Y050AG0001AT
 [V0] Vendor specific: Mellanox ConnectX3 FDR IB / 40GE Adapter for IBM System x
 [RV] Reserved: checksum good, 0 byte(s) reserved
 Read/write fields:
 [V1] Vendor specific: N/A
 [YA] Asset tag: N/A
 [RW] Read-write area: 105 byte(s) free
 [RW] Read-write area: 253 byte(s) free
 [RW] Read-write area: 253 byte(s) free
 [RW] Read-write area: 253 byte(s) free
 [RW] Read-write area: 253 byte(s) free
 [RW] Read-write area: 253 byte(s) free
 [RW] Read-write area: 253 byte(s) free
 [RW] Read-write area: 253 byte(s) free
 [RW] Read-write area: 253 byte(s) free
 [RW] Read-write area: 253 byte(s) free
 [RW] Read-write area: 253 byte(s) free
 [RW] Read-write area: 253 byte(s) free
 [RW] Read-write area: 253 byte(s) free
 [RW] Read-write area: 253 byte(s) free
 [RW] Read-write area: 253 byte(s) free
 [RW] Read-write area: 227 byte(s) free
 End
 Capabilities: [9c] MSI-X: Enable+ Count=128 Masked-
 Vector table: BAR=0 offset=0007c000
 PBA: BAR=0 offset=0007d000
 Capabilities: [60] Express (v2) Endpoint, MSI 00
 DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s <64ns, L1 unlimited
 ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
 DevCtl: Report errors: Correctable- Non-Fatal+ Fatal+ Unsupported-
 RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
 MaxPayload 256 bytes, MaxReadReq 4096 bytes
 DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr- TransPend-
 LnkCap: Port #8, Speed 8GT/s, Width x8, ASPM L0s, Latency L0 unlimited, L1 unlimited
 ClockPM- Surprise- LLActRep- BwNot-
 LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
 ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
 LnkSta: Speed 8GT/s, Width x8, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
 DevCap2: Completion Timeout: Range ABCD, TimeoutDis+, LTR-, OBFF Not Supported
 DevCtl2: Completion Timeout: 260ms to 900ms, TimeoutDis-, LTR-, OBFF Disabled
 LnkCtl2: Target Link Speed: 8GT/s, EnterCompliance- SpeedDis-
 Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
 Compliance De-emphasis: -6dB
 LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete+, EqualizationPhase1+
 EqualizationPhase2+, EqualizationPhase3-, LinkEqualizationRequest-
 Capabilities: [100 v1] Alternative Routing-ID Interpretation (ARI)
 ARICap: MFVC- ACS-, Next Function: 0
 ARICtl: MFVC- ACS-, Function Group: 0
 Capabilities: [148 v1] Device Serial Number f4-52-14-03-00-12-95-00
 Capabilities: [154 v2] Advanced Error Reporting
 UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
 UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
 UESvrt: DLP+ SDES- TLP+ FCP+ CmpltTO+ CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC+ UnsupReq- ACSViol-
 CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
 CEMsk: RxErr+ BadTLP+ BadDLLP+ Rollover+ Timeout+ NonFatalErr+
 AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
 Capabilities: [18c v1] #19
 Kernel driver in use: mlx4_core
 Kernel modules: mlx4_core

The lspci command provides not only useful module option settings being used by the adapters but it also provides the names of the Linux kernel module (highlighted) mlx4_core.

Display loaded kernel modules (drivers)

lsmod can be used to list all the modules currently loaded by the Linux kernel to interface with server hardware. We can see the mlx4_core module is loaded and it depends on the mlx4_en module which is also loaded by the Linux kernel. I’ve highlighted this information for easy review.

# lsmod
 Module Size Used by
 nfsd 311702 13
 lockd 73694 1 nfsd
 nfs_acl 2647 1 nfsd
 auth_rpcgss 46084 1 nfsd
 sunrpc 266363 17 nfsd,lockd,nfs_acl,auth_rpcgss
 exportfs 4236 1 nfsd
 8021q 25527 0
 garp 7152 1 8021q
 stp 2218 1 garp
 llc 5578 2 garp,stp
 ipv6 334932 130
 ext4 378476 12
 jbd2 93427 1 ext4
 mlx4_en 102274 0
 ipmi_si 44687 0
 ipmi_msghandler 38826 1 ipmi_si
 microcode 112653 0
 iTCO_wdt 7115 0
 iTCO_vendor_support 3056 1 iTCO_wdt
 ses 6411 0
 enclosure 8438 1 ses
 sg 29318 0
 cdc_ether 7982 0
 usbnet 38366 1 cdc_ether
 mii 5376 1 usbnet
 i2c_i801 10783 0
 lpc_ich 12995 0
 mfd_core 1895 1 lpc_ich
 igb 199530 0
 dca 7101 1 igb
 i2c_algo_bit 5711 1 igb
 i2c_core 29964 3 i2c_i801,igb,i2c_algo_bit
 ptp 9614 2 mlx4_en,igb
 pps_core 11106 1 ptp
 shpchp 29130 0
 mlx4_core 225773 1 mlx4_en
 ext3 240580 2
 jbd 80950 1 ext3
 mbcache 8193 2 ext4,ext3
 sd_mod 36998 16
 crc_t10dif 1305 1 sd_mod
 wmi 6287 0
 mpt2sas 186063 15
 scsi_transport_sas 35588 1 mpt2sas
 raid_class 4388 1 mpt2sas
 dm_mirror 14384 0
 dm_region_hash 12085 1 dm_mirror
 dm_log 9930 2 dm_mirror,dm_region_hash
 dm_mod 95622 2 dm_mirror,dm_log

Display Mellanox ethernet module (driver) version

Let’s use the module information command (modinfo) to find out more details about each Mellanox module. We see the mlx4_en and mlx4_core module are version 2.2-1

# modinfo mlx4_en
 filename: /lib/modules/2.6.32-504.el6.x86_64/kernel/drivers/net/mlx4/mlx4_en.ko
 version: 2.2-1 (Feb 2014)
 license: Dual BSD/GPL
 description: Mellanox ConnectX HCA Ethernet driver
 author: Liran Liss, Yevgeny Petrilin
 srcversion: 081184276F5CF4B5AE37544
 depends: mlx4_core,ptp
 vermagic: 2.6.32-504.el6.x86_64 SMP mod_unload modversions
 parm: udp_rss:Enable RSS for incomming UDP traffic or disabled (0) (uint)
 parm: pfctx:Priority based Flow Control policy on TX[7:0]. Per priority bit mask (uint)
 parm: pfcrx:Priority based Flow Control policy on RX[7:0]. Per priority bit mask (uint)
 parm: num_lro:Dummy parameter for backward compatibility (uint)
 parm: rss_mask:Dummy parameter for backward compatibility (uint)
 parm: rss_xor:Dummy parameter for backward compatibility (uint)
 parm: enable_tc:Enable separate queues for traffic classes (uint)
 parm: inline_thold:Threshold for using inline data (range: 17-104, default: 104) (uint)
# modinfo mlx4_core
 filename: /lib/modules/2.6.32-504.el6.x86_64/kernel/drivers/net/mlx4/mlx4_core.ko
 version: 2.2-1
 license: Dual BSD/GPL
 description: Mellanox ConnectX HCA low-level driver
 author: Roland Dreier
 srcversion: 237DCCCA5E7401A8F3EFE49
 alias: pci:v000015B3d00001010sv*sd*bc*sc*i*
 alias: pci:v000015B3d0000100Fsv*sd*bc*sc*i*
 alias: pci:v000015B3d0000100Esv*sd*bc*sc*i*
 alias: pci:v000015B3d0000100Dsv*sd*bc*sc*i*
 alias: pci:v000015B3d0000100Csv*sd*bc*sc*i*
 alias: pci:v000015B3d0000100Bsv*sd*bc*sc*i*
 alias: pci:v000015B3d0000100Asv*sd*bc*sc*i*
 alias: pci:v000015B3d00001009sv*sd*bc*sc*i*
 alias: pci:v000015B3d00001008sv*sd*bc*sc*i*
 alias: pci:v000015B3d00001007sv*sd*bc*sc*i*
 alias: pci:v000015B3d00001006sv*sd*bc*sc*i*
 alias: pci:v000015B3d00001005sv*sd*bc*sc*i*
 alias: pci:v000015B3d00001004sv*sd*bc*sc*i*
 alias: pci:v000015B3d00001003sv*sd*bc*sc*i*
 alias: pci:v000015B3d00001002sv*sd*bc*sc*i*
 alias: pci:v000015B3d0000676Esv*sd*bc*sc*i*
 alias: pci:v000015B3d00006746sv*sd*bc*sc*i*
 alias: pci:v000015B3d00006764sv*sd*bc*sc*i*
 alias: pci:v000015B3d0000675Asv*sd*bc*sc*i*
 alias: pci:v000015B3d00006372sv*sd*bc*sc*i*
 alias: pci:v000015B3d00006750sv*sd*bc*sc*i*
 alias: pci:v000015B3d00006368sv*sd*bc*sc*i*
 alias: pci:v000015B3d0000673Csv*sd*bc*sc*i*
 alias: pci:v000015B3d00006732sv*sd*bc*sc*i*
 alias: pci:v000015B3d00006354sv*sd*bc*sc*i*
 alias: pci:v000015B3d0000634Asv*sd*bc*sc*i*
 alias: pci:v000015B3d00006340sv*sd*bc*sc*i*
 depends:
 vermagic: 2.6.32-504.el6.x86_64 SMP mod_unload modversions
 parm: hpn:Dummy option kept for backward compatibility (int)
 parm: debug_level:Enable debug tracing if > 0 (int)
 parm: msi_x:attempt to use MSI-X if nonzero (int)
 parm: num_vfs:enable #num_vfs functions if num_vfs > 0
 num_vfs=port1,port2,port1+2 (array of byte)
 parm: probe_vf:number of vfs to probe by pf driver (num_vfs > 0)
 probe_vf=port1,port2,port1+2 (array of byte)
 parm: log_num_mgm_entry_size:log mgm size, that defines the num of qp per mcg, for example: 10 gives 248.range: 7 <= log_num_mgm_entry_size <= 12. To activate device managed flow steering when available, set to -1 (int)
 parm: enable_64b_cqe_eqe:Enable 64 byte CQEs/EQEs when the FW supports this (default: True) (bool)
 parm: log_num_mac:Log2 max number of MACs per ETH port (1-7) (int)
 parm: log_num_vlan:Log2 max number of VLANs per ETH port (0-7) (int)
 parm: use_prio:Enable steering by VLAN priority on ETH ports (0/1, default 0) (bool)
 parm: log_mtts_per_seg:Log2 number of MTT entries per segment (1-7) (int)
 parm: log_num_qp:log maximum number of QPs per HCA (int)
 parm: log_num_srq:log maximum number of SRQs per HCA (int)
 parm: log_rdmarc_per_qp:log number of RDMARC buffers per QP (int)
 parm: log_num_cq:log maximum number of CQs per HCA (int)
 parm: log_num_mcg:log maximum number of multicast groups per HCA (int)
 parm: log_num_mpt:log maximum number of memory protection table entries per HCA (int)
 parm: log_num_mtt:log maximum number of memory translation table segments per HCA (int)
 parm: port_type_array:Array of port types: HW_DEFAULT (0) is default 1 for IB, 2 for Ethernet (array of int)
 parm: enable_qos:Enable Quality of Service support in the HCA (default: off) (bool)
 parm: internal_err_reset:Reset device on internal errors if non-zero (default 1, in SRIOV mode default is 0) (int)

Display network configuration

Let’s use the ifconfig command to display all the network devices in the example server. Ifconfig returns information about four ethernet devices – eth0, 1, 2, 3.

# ifconfig
 eth0 Link encap:Ethernet HWaddr F4:52:14:12:95:01
 inet addr:9.30.104.203 Bcast:9.30.105.255 Mask:255.255.254.0
 UP BROADCAST RUNNING MULTICAST MTU:9000 Metric:1
 RX packets:2880329882 errors:0 dropped:0 overruns:0 frame:0
 TX packets:2400228392 errors:0 dropped:0 overruns:0 carrier:0
 collisions:0 txqueuelen:2000
 RX bytes:10222717153124 (9.2 TiB) TX bytes:6308574860158 (5.7 TiB)
eth1 Link encap:Ethernet HWaddr 40:F2:E9:75:12:58
 UP BROADCAST MULTICAST MTU:1500 Metric:1
 RX packets:0 errors:0 dropped:0 overruns:0 frame:0
 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
 collisions:0 txqueuelen:1000
 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
 Memory:a95a0000-a95bffff
eth2 Link encap:Ethernet HWaddr 40:F2:E9:75:12:59
 UP BROADCAST MULTICAST MTU:1500 Metric:1
 RX packets:0 errors:0 dropped:0 overruns:0 frame:0
 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
 collisions:0 txqueuelen:1000
 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
 Memory:a95c0000-a95dffff
eth3 Link encap:Ethernet HWaddr 40:F2:E9:75:12:5A
 UP BROADCAST MULTICAST MTU:1500 Metric:1
 RX packets:0 errors:0 dropped:0 overruns:0 frame:0
 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
 collisions:0 txqueuelen:1000
 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
 Memory:a95e0000-a95fffff
lo Link encap:Local Loopback
 inet addr:127.0.0.1 Mask:255.0.0.0
 UP LOOPBACK RUNNING MTU:65536 Metric:1
 RX packets:165271003 errors:0 dropped:0 overruns:0 frame:0
 TX packets:165271003 errors:0 dropped:0 overruns:0 carrier:0
 collisions:0 txqueuelen:0
 RX bytes:253362538208 (235.9 GiB) TX bytes:253362538208 (235.9 GiB)
usb0 Link encap:Ethernet HWaddr 42:F2:E9:75:12:5F
 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
 RX packets:218562 errors:0 dropped:0 overruns:0 frame:0
 TX packets:147 errors:0 dropped:0 overruns:0 carrier:0
 collisions:0 txqueuelen:1000
 RX bytes:6186955 (5.9 MiB) TX bytes:14832 (14.4 KiB)

Display network adapter driver & firmware information

Using ethtool with the information switch (-i) we can see that device eth0 is the Mellanox adapter installed in slot 0f:00. Ethtool confirms the module (drive) being used is mlx4_en, version 2.2-1. We also see the adapter firmware level is 2.30.8000

# ethtool -i eth0
 driver: mlx4_en
 version: 2.2-1 (Feb 2014)
 firmware-version: 2.30.8000
 bus-info: 0000:0f:00.0
 supports-statistics: yes
 supports-test: yes
 supports-eeprom-access: no
 supports-register-dump: no
 supports-priv-flags: no

Let’s use ethtool on ethernet device eth1 and see what information is provided. We see the module (drive) used to talk o the adapter is igb, version 5.0.5-k and the adapter firmware level is 1.63. In addition, we know the adapter is installed in slot 07:00 (highlighted in orange). We know from the lspci command this is the Intel network adapter.

# ethtool -i eth1
 driver: igb
 version: 5.0.5-k
 firmware-version: 1.63, 0x800009fa
 bus-info: 0000:07:00.0
 supports-statistics: yes
 supports-test: yes
 supports-eeprom-access: yes
 supports-register-dump: yes
 supports-priv-flags: no

Leave a comment