Emulex OneCommand Manager Application User Manual (P006979-01A Version 5.2, August 2011)

The OneCommand Manager User Manual Page 185
Using the OneCommand Manager Application Command
Line Interface
The Command Line Interface (CLI) Client component of the OneCommand Manager application
provides access to the capabilities of the Remote Management library from a console command prompt.
This component is intended for use in scripted operations from within shell scripts or batch files. The CLI
Client is a console application named HbaCmd. Each time you run this application from the command
line, a single operation is performed.
The first parameter of this command is the requested operation. When the specified operation is
completed, the command prompt is displayed. Most operations retrieve information about an entity on
the storage area network (SAN) and show that information on the console.
Most of the CLI Client commands require one or more additional parameters that specify the nature of
the command. For FC ports the world wide port name (WWPN) of the adapter must be specified.
For example, run the following command to display the port attributes for the adapter with the specified
WWPN:
hbacmd PortAttributes 10:00:00:00:c9:20:20:20
For iSCSI and NIC ports the MAC address must be specified.
For example, run the following command to set the target properties for the CNA port with the specified
MAC address:
hbacmd SetTargetProperties 00-11-22-33-44-55 iscsiTarget 1
The command sets the extended timeout value to 1.
The OneCommand Manager CLI can be run in TCP/IP mode by making the first argument h=<host>. For
example:
hbacmd h=cp-hp5670 ListHBAs
hbacmd h=138.239.91.121 ListHBAs
Setting Default CIM Credentials Using hbacmd
The hbacmd setcimcred command can be used to set the default credentials that will be used in all
the subsequent CIM management commands if you do not provide any credentials with those
commands. The syntax of this command is given below:
>hbacmd setcimcred <username> <password> <namespace> <port>
For example:
>hbacmd setcimcred root pass123 root/emulex 5989
The default credentials set by the OneCommand Manager GUI and hbacmd will be shared which means
that if a set of default credentials is set by the OneCommand Manager GUI, the same will be used by
hbacmd and vice versa.
Commands Using the Default CIM Credentials
Once the default CIM credentials are set using the above command, these default credentials will be
used for all the subsequent commands using the CIM interface. To specify that the CIM interface is to be
used, the hbacmd commands should be provided with an m=cim flag like this example:
>hbacmd h=10.11.12.13 m=cim portattributes 10:00:00:00:c9:11:22:33