Querying HBA information under Linux

To check the HBA cards installed on your system, check lspci

root@linux:~ # lspci | grep -i fibre
13:01.0 Fibre Channel: Emulex Corporation Thor-X LightPulse Fibre Channel Host Adapter (rev 01)
13:02.0 Fibre Channel: Emulex Corporation Thor-X LightPulse Fibre Channel Host Adapter (rev 01)

You can query various information using systool

root@linux:~ # systool -av -c fc_host
Class = “fc_host”

Class Device = “host0”
Class Device path = “/sys/class/fc_host/host0”
active_fc4s = “0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ”
fabric_name = “0x100000051eecc200”
issue_lip =
maxframe_size = “2048 bytes”
node_name = “0x20000000c95e5ee1”
port_id = “0x0ab040”
port_name = “0x10000000c95e5ee1”
port_state = “Online”
port_type = “NPort (fabric via point-to-point)”
speed = “2 Gbit”
supported_classes = “Class 3”
supported_fc4s = “0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ”
supported_speeds = “1 Gbit, 2 Gbit”
tgtid_bind_type = “wwpn (World Wide Port Name)”
uevent =

Device = “host0”
Device path = “/sys/devices/pci0000:00/0000:00:04.0/0000:12:00.0/0000:13:01.0/host0”
uevent =

Class Device = “host1”
Class Device path = “/sys/class/fc_host/host1”
active_fc4s = “0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ”
fabric_name = “0x100000051ef63200”
issue_lip =
maxframe_size = “2048 bytes”
node_name = “0x20000000c95e93bd”
port_id = “0x14b040”
port_name = “0x10000000c95e93bd”
port_state = “Online”
port_type = “NPort (fabric via point-to-point)”
speed = “2 Gbit”
supported_classes = “Class 3”
supported_fc4s = “0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ”
supported_speeds = “1 Gbit, 2 Gbit”
tgtid_bind_type = “wwpn (World Wide Port Name)”
uevent =

Device = “host1”
Device path = “/sys/devices/pci0000:00/0000:00:04.0/0000:12:00.0/0000:13:02.0/host1”
uevent =

Checking numerous status. Example shown below is a different server

root@linux:~ # systool -c scsi_host -v -d host1
Class = “scsi_host”

Class Device = “host1”
Class Device path = “/sys/class/scsi_host/host1”
84xx_fw_version = “”
beacon = “Disabled”
cmd_per_lun = “3”
driver_version = “8.03.07.15.05.09-k”
eh_deadline = “0”
fabric_param = “1280”
flash_block_size = “0x8000”
fw_state = “0x3 0x2a8c 0x9100 0x5 0x0”
fw_version = “5.06.03 (9496)”
host_busy = “0”
isp_id = “0000 0000 0000 0000”
isp_name = “ISP2432”
max_npiv_vports = “127”
model_desc = “PCI-Express Dual Channel 4Gb Fibre Channel HBA”
model_name = “QLE2462”
mpi_version = “”
npiv_vports_inuse = “0”
optrom_bios_version = “1.08”
optrom_efi_version = “1.02”
optrom_fcode_version= “1.13”
optrom_fw_version = “4.00.12 2”
pci_info = “PCIe (2.5Gb/s x4)”
phy_version = “”
proc_name = “”
scan =
serial_num = “”
sg_tablesize = “255”
state = “Link Up – F_Port”
total_isp_aborts = “0”
uevent =
unchecked_isa_dma = “0”
unique_id = “0”
vlan_id = “”
vn_port_mac_address = “”
vport_create =
vport_delete =
zio_timer = “200 us”
zio = “Disabled”

Device = “host1”
Device path = “/sys/devices/pci0000:00/0000:00:04.0/0000:17:00.0/0000:18:02.0/0000:22:00.0/host1”
fw_dump =
nvram = “ISP ”
optrom_ctl =
optrom =
reset =
sfp = “”
uevent =
vpd = “▒.”

Or you can query each attribute issuing cat /sys/class/scsi_host/hostX/<attribute>

Model name

root@linux:~ # cat /sys/class/scsi_host/host0/model*name
LP10000

Model description

root@linux:~ # cat /sys/class/scsi_host/host0/model*desc
Emulex LP10000 2Gb PCI-X Fibre Channel Adapter

Check this link to see how to upgrade a Fibre Channel HBA on HP Proliant – Upgrading firmware on an Emulex Zephyr-X LightPulse Fibre Channel HBA

HBA ROM version

root@linux:~ # cat /sys/class/scsi_host/host0/opt*rom*
5.01a5

Firmware revision

root@linux:~ # cat /sys/class/scsi_host/host0/fwrev
1.91A1 (T2D1.91A1), sli-2

root@linux:~ # cat /sys/class/scsi_host/host0/fw_version
5.03.01 (496)

Driver version

root@linux:~ # lspci -v | grep -i fibre -A11 | grep driver
Kernel driver in use: lpfc
Kernel driver in use: lpfc

root@linux:~ # modinfo lpfc | egrep ‘filename|version|author|description’
filename: /lib/modules/2.6.18-238.9.1.el5/kernel/drivers/scsi/lpfc/lpfc.ko
version: 0:8.2.0.87.1p
author: Emulex Corporation – tech.support@emulex.com
description: Emulex LightPulse Fibre Channel SCSI driver 8.2.0.87.1p

View script to query HBA information

Advertisement