Emulex hbacmd utility

In my previous post on printing Emulex HBA statistics and resetting Emulex HBAs, I briefly touched on the hbacmd(1m) utility. hbacmd(1m) allows you to view configuration data and print numerous statistics, and is an invaluable resource for troubleshooting SAN problems. hbacmd(1m) lives in /usr/sbin/hbanyware, and provides a help screen when invoked with the “-h” (help) option:

$ hbacmd -h

Usage: hbacmd { h=IP Address or Hostname{:port} } 
Valid Commands:

    Version

    ListHBAs

    HBAAttrib 

    PortAttrib 

    PortStat 

    ServerAttrib 

    TargetMapping 

    Reset 

    Download  

    PersistentBinding  
        Source: {C L}
             C: Configuration
             L: Live

    AllNodeInfo 

    SetPersistentBinding      
        Scope: {P I B}
            P:  Bind set Permanently
            I:  Bind set Immediately
            B:  Bind set Both Immediately and at Reboot
        BindType: {D P N}
            D:  Enable binding by D_ID
            P:  Enable binding by WWPN
            N:  Enable binding by WWNN
        Id: Either WWPN, WWNN, or D_ID (depending on BindType)

    RemoveAllPersistentBinding 

    RemovePersistentBinding     
        BindType: {D P N}
            D:  Enable binding by D_ID
            P:  Enable binding by WWPN
            N:  Enable binding by WWNN
        Id: Either WWPN, WWNN, or D_ID (depending on BindType)

    BindingCapabilities 

    BindingSupport  
        Source: {C L}
             C: Configuration
             L: Live

    SetBindingSupport  
        BindFlag: {D P N A DA PA NA}
            D:  Enable binding by D_ID
            P:  Enable binding by WWPN
            N:  Enable binding by WWNN
            A:  Enable binding by AUTOMAP
            DA: Enable binding by D_ID and AUTOMAP
            PA: Enable binding by WWPN and AUTOMAP
            NA: Enable binding by WWNN and AUTOMAP

    DriverParams 

    DriverParamsGlobal 

    SetDriverParam  
 
        CtrlWord: {P G B N}
            P:  Permanent
            G:  Global
            B:  Both
            N:  Neither

    SetBootBios  
        CtrlWord: {E D}
            E:  Enable
            D:  Disable

To view all of the Emulex HBAs installed in a server, hbacmd(1m) 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

[ ..... ]

To list firmware versions, serial numbers, WWN and a variety of model specific information, the hbacmd(1m) utility 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), # of ports zoned along with this port), hbacmd(1m) 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/pci@84,2000/lpfc@1
Num Discovered Ports: 3
Fabric Name         : 10 00 00 60 69 80 0e fc

In addition to providing super high performance HBAS, Emulex has done a great job with their CLI (their GUI is actually pretty good as well) management utilites!

One Comment

Gary  on October 1st, 2006

Do you have any examples of calling HBACMD from a VBScript?

Leave a Comment