Sharing Knowledge | System Admin Articles

Managing Emulex HBA with hbacmd



The Emulex hbacmd utility can be used to print lot of configuration and performance attributes and can be used to manage the HBA operations. 

To view performance metrics of HBA:

To view all available performance metrics, the hbacmd utility can be invoked with the “portstat” option and the WWPN to view:
 
# hbacmd PortStat 10:00:00:00:c9:49:28:47

Port Statistics for10:00:00:00:c9:49:28:47

Secs Since Last Reset : 21573
Exchange Count: 1308267
Responder Exchange Count: 363
TX Seq Count : 1315705
RX Seq Count : 6357365
TX Frame Count : 1336810
RX Frame Count : 161483066
TX Word Count : 31567104
RX Word Count : 3316320000
TX KB Count :123309
RX KB Count : 12954375
LIP Count : -1
NOS Count : 0
Error Frame Count : 0
Dumped Frame Count : -1
Link Failure Count : 1
Loss of Sync Count : 0
Loss of Signal Count : 0
Prim Seq Prot Err Count : 0
Invalid TX Word Count : 8
Invalid RX Frame CRC Cnt: 0


Resetting Emulex HBAs
 
On some situations, it may be necessary to reset an Emulex HBA to re-establish connectivity to fabric services.  To reset an adaptor with hbacmd, the WWPN is passed as an parameter:
# /usr/sbin/hbanyware/hbacmd Reset 10:00:00:00:c9:49:2c:b4
Reset HBA 10:00:00:00:c9:49:2c:b4

List all available HBAs:

To view all of the Emulex HBAs installed in a server, hbacmd can be invoked with the “listhbas” option:
# hbacmd listhbas

Manageable HBA List

Port WWN   : 10:00:00:00:c9:49:28:42
Node WWN   : 20:00:00:00:c9:49:28:42
Fabric Name: 10:00:00:60:69:80:2d:ee
Flags      : 8000f980
Host Name  : server01
Mfg        : Emulex Corporation

Port WWN   : 10:00:00:00:c9:49:28:47
Node WWN   : 20:00:00:00:c9:49:28:47
Fabric Name: 10:00:00:60:69:80:0e:fc
Flags      : 8000f980
Host Name  : fraudmgmt01
Mfg        : Emulex Corporation

Get HBA and Port Attributes:

To list firmware versions, serial numbers, WWN and a variety of model specific information, the hbacmd can be invoked with the “hbaattrib” option and the WWN to probe:
# hbacmd HBAAttrib 10:00:00:00:c9:49:28:47

HBA Attributes for 10:00:00:00:c9:49:28:47

Host Name      : server01
Manufacturer   : Emulex Corporation
Serial Number  : MS51403247
Model          : LP9802
Model Desc     : Emulex LightPulse LP9802 2 Gigabit PCI Fibre Channel Adapter
Node WWN       : 20 00 00 00 c9 49 28 47
Node Symname   : Emulex LP9802 FV1.91A1 DV6.02f
HW Version     : 2003806d
Opt ROM Version: 1.50a4
FW Version     : 1.91A1 (H2D1.91A1)
Vender Spec ID : 80F9
Number of Ports: 1
Driver Name    : lpfc
Device ID      : F980
HBA Type       : LP9802
Operational FW : SLI-2 Overlay
SLI1 FW        : SLI-1 Overlay 1.91a1
SLI2 FW        : SLI-2 Overlay 1.91a1
IEEE Address   : 00 00 c9 49 28 47
Boot BIOS      : Fcode Firmware1.50a4
Driver Version : 6.02f; HBAAPI(I) v2.0.e, 11-07-03

To view host Port information (e.g., port speed, device paths) and fabric parameters (e.g., fabric ID (S_ID), number of ports zoned along with this port), hbacmd can be invoked with the “portattrib” option:
# hbacmd PortAttrib 10:00:00:00:c9:49:28:47

Port Attributes for 10:00:00:00:c9:49:28:47

Node WWN            : 20 00 00 00 c9 49 28 47
Port WWN            : 10 00 00 00 c9 49 28 47
Port Symname        :
Port FCID           : 6D0900
Port Type           : Fabric
Port State          : Operational
Port Service Type   : 6
Port Supported FC4  : 00 00 01 20 00 00 00 01
                      00 00 00 00 00 00 00 00
                      00 00 00 00 00 00 00 00
                      00 00 00 00 00 00 00 00
Port Active FC4     : 00 00 01 20 00 00 00 01
                      00 00 00 00 00 00 00 00
                      00 00 00 00 00 00 00 00
                      00 00 00 00 00 00 00 00
Port Supported Speed: 2 GBit/sec.
Port Speed          : 2 GBit/sec.
Max Frame Size      : 2048
OS Device Name      : /devices/[email protected],2000/[email protected]
Num Discovered Ports: 3
Fabric Name         : 10 00 00 60 69 80 0e fc

Emulex is providing lot of CLI and GUI management utilites to manage HBA's. Hope this helps..!


Labels: Linux

My Profile PhotoAbout the Author

I'm Parthiban, An UNIX System Admin by Profession. I'm Experienced in Linux/Unix System Administration and Scripting. I have done lot of work on the infrastructure Mgmt side in Linux, UNIX and Windows system administration, Hardware, Storage and Data center. I'm blogging since 2008.
Follow Me On Twitter or On Facebook

1 Comments for "Managing Emulex HBA with hbacmd"

do you know how to get controller number for a remotely configured lpfc without using veritas command.

What do you think about this Article? Add your Opinion..!

Back To Top