Wednesday, July 29, 2009

Emulex hbacmd utility

Emulex statistics:
The Emulex hbacmd(1m) utility can be used to print numerous configuration and performance attributes. The performance attributes can be used to gauage throughput and signal loss, which can aide in debugging performance and reliability issues. 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 for
10: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

This data could easily be integrated with Orca to provide useful historical graphs. Nice!"


Resetting Emulex HBAs
On rare ocassions it may be necessary to reset an Emulex HBA to re-establish connectivity to fabric services, and to find new targets and LUNs that have been added to the fabric. This can be accomplished with a system reboot ( which takes a good deal of time, and is not an option when availability is the primary service driver), or with the Emeulex hbacmd(1m) or lputil(1m) utilities. To reset an adaptor with hbacmd(1m), the WWPN is passed as an option:

$/usr/sbin/hbanyware/hbacmd Reset 10:00:00:00:c9:49:2c:b4
Reset HBA 10:00:00:00:c9:49:2c:b4
To reset an HBA through the lputil(1m) text-base menu, you can select option 4 from the main menu, and pick the adaptor to reset:

$ /usr/sbin/lputil/lputil
LightPulse Common Utility for Solaris/SPARC. Version 2.0a5
(4/7/2005).Copyright (c) 2005, Emulex Corporation
Emulex Fibre Channel Host
Adapters Detected: 3Host Adapter 0 (lpfc3) is an LP9802 (Ready Mode)Host Adapter
1 (lpfc4) is an LP9802 (Ready Mode)Host Adapter 2 (lpfc5) is an LP9802 (Ready Mode)
MAIN MENU
1. List Adapters

2. Adapter Information

3. Firmware Maintenance

4. Reset Adapter

5. Persistent Bindings
0. Exit
Enter choice
=> 4

0. lpfc3

1. lpfc4

2. lpfc5
Select an adapter => 0
MAIN MENU
1. List Adapters

2. Adapter Information

3. Firmware Maintenance

4. Reset Adapter

5. Persistent Bindings
0. Exit
Enter choice => 0


Once the adaptor is reset, you should see a message similar to the following in the system logfile:
Sep 7 15:23:49 tiger lpfc: [ID 728700 kern.warning] WARNING: lpfc3:1303:LKe:Link Up Event x1 received Data: x1 x0 x8 x14
Emulex makes a killer HBA, and provides several awesome software utilities to manage host side SAN connectivity.

No comments: