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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • 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. initctl Command Examples in Linux
  2. macof: command not found
  3. How to disable “Alt+Ctrl+Del” causing system reboot in CentOS/RHEL 7
  4. How to remove the multipath device after unmapping the storage LUN from server
  5. How to Disable IPv6 on Ubuntu 18.04 Bionic Beaver Linux
  6. featureCounts: command not found
  7. Invalid ABI Option abi=aapcs-linux
  8. Magento 2.3.3 Redis cache grows unlimited
  9. How to Make User Account Read-Only in CentOS/RHEL 7
  10. “docker dead but subsys locked” – error while starting docker

You May Also Like

Primary Sidebar

Recent Posts

  • What are /dev/zero and /dev/null files in Linux
  • grpck command – Remove corrupt or duplicate entries in the /etc/group and /etc/gshadow files.
  • xxd command – Expressed in hexadecimal form
  • sesearch: command not found

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright