• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to get Fibre Channel HBA information from Linux SOSreport

By admin

The default data collection tool on most versions of Linux is SOSreport. A SOSreport can be gathered using the following command (run as root):

# sosreport

Once completed, sosreport will generate a compressed a file under /tmp. Different versions use different compression schemes (gz, bz2, or xz).

Getting HBA port WWN, model number, and driver/firmware versions from SOSreport

Check for the presence of /proc/scsi/adapter_type/n. Where “adapter_type” is the host adapter type and “n” is the host adapter number for your card. Your host adapter type can be either qlaxxxx for QLogic adapters or lpfc for Emulex adapters. If using Qlogic HBA, look for /proc/scsi/qla2xxx:

/proc/scsi/qla2xxx % ls
./ ../ 14 15
/proc/scsi/qla2xxx % more 14
QLogic PCI to Fibre Channel Host Adapter for QLE2462:                           << HBA model number
Firmware version 5.03.02 [IP] [84XX] , Driver version 8.02.10.01.04.09-d        << HBA firmware and driver versions 
ISP: ISP2432
Request Queue = 0x80b080000, Response Queue = 0x80b040000
Request Queue count = 4096, Response Queue count = 512
Total number of active commands = 0
Total number of interrupts = 353067390
Device queue depth = 0x20
Number of free request entries = 267
Number of mailbox timeouts = 0
Number of ISP aborts = 0
Number of loop resyncs = 0
Number of retries for empty slots = 0
Number of reqs in pending_q= 0, retry_q= 0, done_q= 0, scsi_retry_q= 0
Host adapter:loop state = , flags = 0x45a03
Dpc flags = 0x4000000
MBX flags = 0x0
Link down Timeout = 030
Port down retry = 030
Login retry count = 030
Commands retried with dropped frame(s) = 0
Product ID = 0000 0000 0000 0000

SCSI Device Information:
scsi-qla0-adapter-node=2000001b321d6335; 
scsi-qla0-adapter-port=2100001b321d6335;                             << HBA port WWN

This information can also often be found in/var/log/messages:

# more /var/log/messages
...
Nov 2 08:55:05 server1 kernel: (scsi): Found a QLA2200 @ bus 1, device 0x1,irq 20, iobase 0x2300
Nov 2 08:55:10 server1 kernel: scsi(3): Configure NVRAM parameters...
Nov 2 08:55:10 server1 kernel: scsi(3): Verifying loaded RISC code...
Nov 2 08:55:10 server1 kernel: scsi(3): Verifying chip...
Nov 2 08:55:10 server1 kernel: scsi(3): Waiting for LIP to complete...
Nov 2 08:55:10 server1 kernel: scsi(3): LOOP UP detected
Nov 2 08:55:10 server1 kernel: scsi3: Topology - (F_Port), Host Loop address 0xffff
Nov 2 08:55:10 server1 kernel: scsi(3): Waiting for LIP to complete...
Nov 2 08:55:10 server1 kernel: scsi3: Topology - (F_Port), Host Loop address 0xffff
Nov 2 08:55:10 server1 kernel: scsi-qla0-adapter-node=2000001b321d6335;
Nov 2 08:55:10 server1 kernel: scsi-qla0-adapter-port=2100001b321d6335;                      << HBA port WWN
Nov 2 08:55:10 server1 kernel: scsi-qla0-target-0=50060e800545ab12
/var/log $ more dme* | grep -i driver                                      
QLogic QLE2562 - Sun StorageTek 8Gb FC PCIe HBA, dual port           << HBA model number
QLogic Fibre Channel HBA Driver: 8.03.07.03.06.1-k                   << HBA driver version
var/log % more dme* | grep -i fw
18:48:00,489 INFO kernel:qla2xxx 0000:1b:00.0: firmware: requesting ql2500_fw.bin
18:48:00,526 INFO kernel:  ISP2532: PCIe (5.0GT/s x4) @ 0000:1b:00.0 hdma+, host#=2, fw=5.03.16 (d5)        << HBA Firmware version 5.03.16

Getting HBA subsystem-id (and derive HBA model number and vendor)

grep for ‘Subsystem‘ in /sos_commands/hardware/lspci:

$ grep Subsystem /sos_commands/hardware/lspci
1077:0171                     << 0171 is the Subsystem-id

or grep for 'subDeviceId' in /etc/sysconfig/hwconf

$ grep subDeviceId /etc/sysconfig/hwconf
subDeviceId: 0143                << 143 is the Subsystem-id

or grep for 'pci.subsys' in /sos_commands/hardware/lshal

$ grep pci.subsys /sos_commands/hardware/lshal
pci.subsys_product_id = 323 (0x143) (int)   << 143 is the Subsystem-id

Filed Under: CentOS/RHEL 6, CentOS/RHEL 7, Linux

Some more articles you might also be interested in …

  1. How to Install Oracle Linux (UEK-2) with btrfs as a root filesystem
  2. How to use rndc command (command-line administration tool for named)
  3. CentOS / RHEL 7 : How to configure kdump
  4. Common Init.ora Parameters and Unix, Linux Kernel Parameters and Relationship Between Them
  5. How to Enable X11 Forwarding on CentOS/RHEL 5,6,7
  6. Linux OS Service ‘portreserve’
  7. How to Disable Daylight Savings Time (DST), and Modify the Timezone on Linux
  8. How to recreate LVM device files under /dev directory using vgmknodes
  9. How to use command line shell functions in Linux
  10. How to Extend allowed number of loopback devices

You May Also Like

Primary Sidebar

Recent Posts

  • Oracle Database – Configuring Secure Application Roles
  • Extend rule sets by using factors in Oracle Database Vault
  • What are Command Rules in oracle Database
  • Using Rule Sets in Oracle Database Vault
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary