Operating System - Linux
1756181 Members
3172 Online
108842 Solutions
New Discussion юеВ

Re: How to get HBS driver info on a SLES 10 machine

 
Masthan
Advisor

How to get HBS driver info on a SLES 10 machine

Hi All,

Can any one explain the best way to get the HBA driver info on a SLES 10 machine?

Rgds
USHA
8 REPLIES 8
Matti_Kurkela
Honored Contributor

Re: How to get HBS driver info on a SLES 10 machine

A generic way:
go to /proc/scsi, find the sub-directory of your HBA driver ("lpfc" for Emulex FC HBAs, "qla2xxx" for Qlogic FC HBAs, various other names for SCSI HBAs). Examine the files in that directory to find some basic information.

Typically the directory has one file per HBA controlled by that particular driver.

The files will be reported as having zero size, as is normal with the /proc filesystem: the content is actually generated dynamically from kernel data structures at the time the file is opened.

To get more information than that, you may need HBA manufacturer-specific tools (for example, the "lputil" command for Emulex HBAs).

MK
MK
Masthan
Advisor

Re: How to get HBS driver info on a SLES 10 machine

Hi All,

I have one RHEL5 and one SLES10 machines and each machine has one qlogic HBA.

Generally To get the driver name of a HBA i will use the /Sys file system.

I use the following command to get the HBA driver info.

#cat /sys/class/scsi_host/*/proc_name

The above command is working fine on RHEL4 and SLES10 but it is returning on SLES 10 and on RHEL5. Is it a but in SLES10/RHEL5 ?

Rgds
USHA
Steven E. Protter
Exalted Contributor

Re: How to get HBS driver info on a SLES 10 machine

Shalom,

lsmod will tell you which ones are loaded in memory.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Masthan
Advisor

Re: How to get HBS driver info on a SLES 10 machine

Hi Shalom,

lsmod gives you the list of loaded driver modules, but i want to figure out which driver is driving a specific HBA.

-USHA
Hemmetter
Esteemed Contributor

Re: How to get HBS driver info on a SLES 10 machine

Hi,

e.g. lpfc

# cd /sys/class/scsi_host/host1
# cat lpfc_drvr_version
Emulex LightPulse Fibre Channel SCSI driver 8.1.10.3

or:

# cd /sys/module/lpfc
# cat version
0:8.1.10.3

rgds
HGH
Masthan
Advisor

Re: How to get HBS driver info on a SLES 10 machine


Hi Hemmetter,

Thanks for reply!

But I am keen about Qlogic HBA on SLES10/RHEL5.

Rgds
USHA
Hemmetter
Esteemed Contributor

Re: How to get HBS driver info on a SLES 10 machine

Hi USHA,

It is not easy to explain this in a generic way. The way do get this information changes from kernel to kernel and differs from driver to driver.

Driver version can be retrieved by
# dmesg | grep "QLogic.*Driver"
QLogic Fibre Channel HBA Driver: 8.01.02-sles

but even this grep -pattern varies.


You can also follow your pci-bus-id to find information under /sys:

# lspci | grep Q
0000:03:02.0 SCSI storage controller: QLogic Corp. QLA2200 64-bit Fibre Channel
Adapter (rev 05)



# find /sys | grep 03:02
/sys/bus/pci/drivers/qla2200/0000:03:02.0
/sys/bus/pci/devices/0000:03:02.0
/sys/devices/pci0000:03/0000:03:02.0
/sys/devices/pci0000:03/0000:03:02.0/host6
/sys/devices/pci0000:03/0000:03:02.0/host6/nvram
/sys/devices/pci0000:03/0000:03:02.0/host6/fw_dump
/sys/devices/pci0000:03/0000:03:02.0/host6/power
/sys/devices/pci0000:03/0000:03:02.0/host6/power/state
/sys/devices/pci0000:03/0000:03:02.0/host6/detach_state
/sys/devices/pci0000:03/0000:03:02.0/pools
/sys/devices/pci0000:03/0000:03:02.0/config
/sys/devices/pci0000:03/0000:03:02.0/resource
/sys/devices/pci0000:03/0000:03:02.0/irq
/sys/devices/pci0000:03/0000:03:02.0/class
/sys/devices/pci0000:03/0000:03:02.0/subsystem_device
/sys/devices/pci0000:03/0000:03:02.0/subsystem_vendor
/sys/devices/pci0000:03/0000:03:02.0/device
/sys/devices/pci0000:03/0000:03:02.0/vendor
/sys/devices/pci0000:03/0000:03:02.0/power
/sys/devices/pci0000:03/0000:03:02.0/power/state
/sys/devices/pci0000:03/0000:03:02.0/detach_state

Now you have to decide yourself if one of these holds the information you are searching for.


And even in the
/sys/class/scsi_host/host$(X)/*
you may find something helpful.

You just have to select the right hostX subdirectory.


Or do you want to know what module you have to load to use your QLogic HBA?

#find /lib/modules/ | grep -i qla
will give you a clue about available kernel modules.
now you can modprobe one by one until you get a positive response.


rgds
HGH





Ciro  Iriarte
Valued Contributor

Re: How to get HBS driver info on a SLES 10 machine

Do a lspci to locate the device ID for your device.

In my case (I know this machine has an Emulex HBA so i filter that) "lspci |grep -i emul" gives:

0e:00.0 Fibre Channel: Emulex Corporation Zephyr LightPulse Fibre Channel Host Adapter (rev 02)

take that ID and do a search on /sys/bus/pci/drivers/, example:

>> find /sys/bus/pci/drivers/ -name "*0e:00.0*"
/sys/bus/pci/drivers/lpfc/0000:0e:00.0

The name you get in /sys/bus/pci/$NAME/$DID is the module that took the device....

Later you can check the modules info with modinfo:

-------
modinfo lpfc
filename: /lib/modules/2.6.16.46-0.12-xen/kernel/drivers/scsi/lpfc/lpfc.ko
version: 0:8.1.10.11
author: Emulex Corporation - tech.support@emulex.com
description: Emulex LightPulse Fibre Channel SCSI driver 8.1.10.11
license: GPL
srcversion: 70F076A0BEAB8A264894692
alias: pci:v000010DFd0000FC40sv*sd*bc*sc*i*
alias: pci:v000010DFd0000F111sv*sd*bc*sc*i*
alias: pci:v000010DFd0000F112sv*sd*bc*sc*i*
alias: pci:v000010DFd0000F011sv*sd*bc*sc*i*
alias: pci:v000010DFd0000F015sv*sd*bc*sc*i*
alias: pci:v000010DFd0000F100sv*sd*bc*sc*i*
alias: pci:v000010DFd0000FC20sv*sd*bc*sc*i*
alias: pci:v000010DFd0000FC10sv*sd*bc*sc*i*
alias: pci:v000010DFd0000FC00sv*sd*bc*sc*i*
alias: pci:v000010DFd0000F0A1sv*sd*bc*sc*i*
alias: pci:v000010DFd0000F0A5sv*sd*bc*sc*i*
alias: pci:v000010DFd0000F0E1sv*sd*bc*sc*i*
alias: pci:v000010DFd0000F0E5sv*sd*bc*sc*i*
alias: pci:v000010DFd0000FE12sv*sd*bc*sc*i*
alias: pci:v000010DFd0000FE11sv*sd*bc*sc*i*
alias: pci:v000010DFd0000FE00sv*sd*bc*sc*i*
alias: pci:v000010DFd0000F0D1sv*sd*bc*sc*i*
alias: pci:v000010DFd0000F0D5sv*sd*bc*sc*i*
alias: pci:v000010DFd0000FD12sv*sd*bc*sc*i*
alias: pci:v000010DFd0000FD11sv*sd*bc*sc*i*
alias: pci:v000010DFd0000FD00sv*sd*bc*sc*i*
alias: pci:v000010DFd0000F0F7sv*sd*bc*sc*i*
alias: pci:v000010DFd0000F0F6sv*sd*bc*sc*i*
alias: pci:v000010DFd0000F0F5sv*sd*bc*sc*i*
alias: pci:v000010DFd0000F098sv*sd*bc*sc*i*
alias: pci:v000010DFd0000F095sv*sd*bc*sc*i*
alias: pci:v000010DFd0000F700sv*sd*bc*sc*i*
alias: pci:v000010DFd0000F800sv*sd*bc*sc*i*
alias: pci:v000010DFd0000F900sv*sd*bc*sc*i*
alias: pci:v000010DFd0000F980sv*sd*bc*sc*i*
alias: pci:v000010DFd0000FA00sv*sd*bc*sc*i*
alias: pci:v000010DFd00001AE5sv*sd*bc*sc*i*
alias: pci:v000010DFd0000FB00sv*sd*bc*sc*i*
depends: scsi_mod,scsi_transport_fc
vermagic: 2.6.16.46-0.12-xen SMP gcc-4.1
parm: lpfc_poll:FCP ring polling mode control: 0 - none, 1 - poll with interrupts enabled 3 - poll and disable FCP ring interrupts (int)
parm: lpfc_nodev_tmo:Seconds driver will hold I/O waiting for a device to come back (int)
parm: lpfc_devloss_tmo:Seconds driver will hold I/O waiting for a device to come back (int)
parm: lpfc_log_verbose:Verbose logging bit-mask (int)
parm: lpfc_lun_queue_depth:Max number of FCP commands we can queue to a specific LUN (int)
parm: lpfc_hba_queue_depth:Max number of FCP commands we can queue to a lpfc HBA (int)
parm: lpfc_scan_down:Start scanning for devices from highest ALPA to lowest (int)
parm: lpfc_topology:Select Fibre Channel topology (int)
parm: lpfc_link_speed:Select link speed (int)
parm: lpfc_fcp_class:Select Fibre Channel class of service for FCP sequences (int)
parm: lpfc_use_adisc:Use ADISC on rediscovery to authenticate FCP devices (int)
parm: lpfc_ack0:Enable ACK0 support (int)
parm: lpfc_cr_delay:A count of milliseconds after which an interrupt response is generated (int)
parm: lpfc_cr_count:A count of I/O completions after which an interrupt response is generated (int)
parm: lpfc_multi_ring_support:Determines number of primary SLI rings to spread IOCB entries across (int)
parm: lpfc_multi_ring_rctl:Identifies RCTL for additional ring configuration (int)
parm: lpfc_multi_ring_type:Identifies TYPE for additional ring configuration (int)
parm: lpfc_fdmi_on:Enable FDMI support (int)
parm: lpfc_discovery_threads:Maximum number of ELS commands during discovery (int)
parm: lpfc_max_luns:Maximum allowed LUN (int)
parm: lpfc_poll_tmo:Milliseconds driver will wait between polling FCP ring (int)
parm: lpfc_use_msi:Use Message Signaled Interrupts, if possible (int)
-------