Emulex Logo
OneCore™ Storage SDK Release 11.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
CLI Commands and Their Usage

This section describes the elxsdkutil’s command usage and details. The elxsdkutil provides a simple command line interface (CLI) to perform various functions, such as downloading firmware to the flash and retrieving dump files for debugging purposes.

List of Commands

CommandNameRestrictions
add-ipAdd IPiSCSI only
cmpCompare 
connection-infoConnection InformationLinux and iSCSI only
create-vportCreate VPortLPe1600x HBAs only
driver-dumpDriver Dump 
driver-infoDriver Information 
dumpFirmware Dump 
dump-to-hostGenerate Dump to HostLPe1600x HBAs only
efdcEFD CapabilitiesOCe11102 adapters only
file-infoFile Information of UFI 
gendumpGenerate DumpLPe1600x HBAs only
helpHelp 
linkcfg-getGet Link ConfigurationLPe1600x HBAs only
linkcfg-setSet Link ConfigurationLPe1600x HBAs only
listList Adapters 
mgmt-infoManagement Information 
objenumObjects EnumerateLPe1600x HBAs only
readRead Object FileLPe1600x HBAs only
read-link-statusRead Link StatusLPe1600x HBAs only
read-revRead Adapter Version 
read-statusRead Device StatusLPe1600x HBAs only
remove-vportRemove VPortLPe1600x HBAs only
set-macSet MAC AddressiSCSI only
sfpSFP EEPROM Data 
show-ipsShow IPsiSCSI only
show-macShow MACiSCSI only
versionVersion of Program 
writeWrite Firmware Image 

Command Usage

Syntax Information

To invoke the CLI and run the elxsdkutil commands, use the following syntax:
elxsdkutil [command] [option(s)]
For example, to compare the data in the flash on device 2 to the data in the “myfile” file, use the following command:
elxsdkutil cmp -d 2 -f myfile
Syntax Notes

  • Angled brackets, “< >”, indicates a specific value to include with the option.
  • Square brackets, “[]”, indicate optional parameters.

Common Command Options

The Device Number, Filename, and Host options are used by multiple commands.

Device Number (--device, -d)

The Device Number option indicates the device number of the adapter’s port(s). The command line syntax is:
–device <devicenum>
-or-
-d <devicenum>
Where <devicenum> is a non-negative integer (0, 1, 2, and so on).
Note: The default device number is 0. That is, if the devicenum is not specified for a command, it is assumed that the devicenum is 0.

Filename (--file, -f)

The Filename option indicates the filename for downloads, compares, saving dump information, and so on. The command line syntax is:
–file <filename>
-or-
-f <filename>

Host (--host)

The Host option is used with the OneCore Storage user space drivers. When using one of the user space drivers, this option specifies the host name or IP address of the system on which the user space driver is running. This option is required on all commands that access a device. The command line syntax is:
–host <hostname>
For details on the user space drivers (Uspace ocs_fc_ramd and Uspace ocs_iscsi_ramd), see the latest OneCore Storage Reference Driver Manual.

Help Menu

See help

Command Details

add-ip (Add IP)

This command adds an additional Internet Protocol (IP) address to an iSCSI adapter. The IP address (<ip address>) and network mask (<net mask>) values must be in the same IP version format, either IPv4 (###.###.###.###) or IPv6 (####:####:####:####:####:####:####:####). Also see show-ips (Show IPs),
Note: This command is applicable to iSCSI adapters only.
Syntax
add-ip <ip address> <net mask> [-d <devicenum>] [–host <hostname>]
Example
Add an additional IP address of 20.0.0.120 and net mask of 255.255.255.0 to device 2: elxsdkutil add-ip 20.0.0.120 255.255.255.0 -d 2

cmp (Compare)

This command compares the adapter flash data with the specified file data. The output indicates that the “Firmware verification was successful!” or the “Firmware verification failed,” including a list of the mismatched sections.
Syntax
cmp [-d <devicenum>] -f <filename> [–host <hostname>]
Example
Compare the data stored in the device 2 flash to the data in the “myfile” file:
elxsdkutil cmp -d 2 -f myfile

connection-info (Connection Information)

If a connection handle is provided, this command reports information on that Transmission Control Protocol (TCP) connection. If no connection handle is provided, this command displays a list of open TCP connections.
Note: This command is applicable to Linux and iSCSI only.
Syntax
connection-info [-d <devicenum>] [–host <hostname>]
[–connection-handle <handle>]
Example
Display information on TCP connections for device 1:
elxsdkutil connection-info -d 1

create-vport (Create Vport)

This command creates a virtual port (Vport). The WWNN and WWPN values are in the format of eight pairs of hexadecimal digits separated by colons (for example, 10:00:00:00:c9:01:02:03).
Notes

  • If values for WWNN and WWPN are not specified, then the SLI Port will assign the appropriate WWNN/WWPN values.
  • The syntax must include an “–initiator” or “–target,” or both.
  • This command is applicable to LPe16000/LPe16002 HBAs only
  • For the OneCore Storage SCST driver (ocs_fc_scst), this elxsdkutil command has no effect. To create a vport for the ocs_fc_scst driver, see section “3.2.7.1 Creating a Virtual Port (vport)” in the OneCore Storage SCST Driver Guide, Revision 1.5 or later.
Syntax
create-vport [<WWNN>] [<WWPN>] [–initiator] [–target]
[-d <devicenum>] [–host <hostname>]
Example
Create a Vport on device 0:
elxsdkutil create-vport 20:00:00:00:c9:01:02:03 10:00:00:00:c9:01:02:03 –target

driver-dump (Driver Dump)

This command dumps the internal driver information.
Options
The following options are available for the driver-dump command.

  • If values for WWNN and WWPN are not specified, then the SLI Port will assign the appropriate WWNN/WWPN values.
  • bufsize <buffer size> – specifies the size of the memory buffer used to retrieve the dump. The <size> is specified in units of bytes in the form of <number> [k, M]. The default is “4M” (4 megabytes).
  • saved – dumps the contents from a previously-saved driver dump capture.
  • clrsaved – clears the previously-saved driver dump capture, so that a new one driver dump snapshot can be saved.
Contents of various queue entries can be included in the driver dump by specifying the following queue options:

  • cqes – includes the contents of the completion queues entries (CQEs). It is dumped automatically when no queue options are specified. If other queue options are specified, then it is not dumped automatically.
  • eqes – includes the contents of the event queue entries (EQEs).
  • mqes – includes the contents of the mailbox queues entries (MQEs).
  • rqes – includes the contents of the receive queues entries (RQEs).
  • wqes – includes the contents of the work queues entries (WQEs). It is dumped automatically when no queue options are specified. If other queue options are specified, then it is not dumped automatically.
The number of the latest queue entries can be specified using the following option:

  • qentries <entries to dump> – specifies the number of the most recent queue entries to dump. To dump the entire queue, <entries to dump> is “-1”. The default of <entries to dump> is “32”.
Syntax
driver-dump [-d <devicenum>] [–wqes] [–cqes] [–mqes] [–rqes]
[–eqes] [–qentries <entries to dump>] [–host <hostname>]
[–bufsize <buffer size>] [–saved] [–clrsaved]
Examples
Dump the internal driver information, including the latest 32 queue entries of the CQ and WQ:
elxsdkutil driver-dump
Dump the internal driver information, including all of the CQ and WQ entries:
elxsdkutil driver-dump –qentries -1
Dump the internal driver information, including the latest twelve queue entries of the CQ, EQ, and MQ:
elxsdkutil driver-dump –cqes –eqes –mqes –qentries 12

driver-info (Driver Information)

This command displays the parameters used when the driver was loaded (which may not be the current ones).
Syntax
driver-info [-d <devicenum>] [–host <hostname>]<filename>
Example
Retrieve the module parameter values for a Linux target loaded with the ocs_fc_ramd driver:
elxsdkutil driver-info
Output
ramdisc_size: 50m
ramdisc_blocksize: 512
num_luns: 1
initiator: false
target: true
logmask: 0x0
ctrlmask: 0x0
wwn_bump: 0
topology: 0
speed: 0
p_type: 0
holdoff_link_online: false
enable_hlm: false
hlm_group_size: 8
logdest: 1
ramlog_size: 1048576
hal_war_version: 0
num_scsi_ios: 8192
dif_separate: false

dump (Firmware Dump)

For LPe16000/LPe16002 HBAs, this command retrieves the dump.bin file for debugging purposes. The dump.bin file is generated by the gendump (Generate Dump) command.
For OCe11102 adapters, this command includes four dump options:

  • ecd – this Emulex core dump (ECD) option uses the XE4310R template to retrieve the XE4310R controller core dump diagnostic information from a device to a specified file. This is the default option.
  • ecdtest – this option creates an ECD test file that is used to verify the core dump operation. The result is a binary file that needs to be verified by Emulex.
  • efd – this option retrieves enhanced failure dump (EFD) data from the adapter to a specified file.
  • fat – this option retrieves failure analysis tool (FAT) data from the adapter to a specified file.
Syntax
dump [–fat | –efd | –ecd | –ecdtest ] [-d <devicenum>]
[–host <hostname>] [-f <filename>]
Examples
For LPe16000/LPe16002 HBAs, the following example retrieves the dump.bin file from device 2 and saves it to the myfile file:
elxsdkutil dump –ecd -f myfile
For the OCe11102 adapters, the following examples show some of the command’s various options:

  • Use the ECD option from device 0, and save the data to the “myfile” file:
    elxsdkutil dump –ecd -f myfile
    Or since “ecd” is the default, you can simply use:
    elxsdkutil dump -f myfile
  • Save the EFD data of device 1 to the myfile file:
    elxsdkutil dump –efd -d 1 -f myfile
  • Save the FAT data of device 3 to the myfile file:
    elxsdkutil dump –fat -d 3 -f myfile

dump-to-host (Generate Dump to Host)

Enables a device to generate a dump and transfer it directly to host memory. This command combines the “gendump” and “dump” commands into a single operation. If a filename is not specified, the dump is written to the dump.bin file.
Note: This command is applicable to LPe16000/LPe16002 HBAs only.
Syntax
dump-to-host [-d <devicenum>] [–host <hostname>] [-f <filename>]
Example
The following example generates a dump from device 2, saves it to the “myfile” file, and transfers this file to the host:
elxsdkutil dump-to-host -d 2 -f myfile

efdc (EFD Capabilities)

This command reports the EFD capabilities (firmware log settings) from the adapter.
Note: This command is applicable to OCe11102 adapters only
Syntax
efdc [-d <devicenum>] [–host <hostname>]
Example
Display the EFD capabilities of device 0:
elxsdkutil efdc

file-info (File Information of UFI)

This command provides information for an Emulex unified firmware image (.UFI), including the file signature, the version, file length, and other information.
Syntax
file-info -f <filename>
Example
Display the UFI file and image information for the myfile file:
elxsdkutil file-info -f myfile

gendump (Generate Dump)

This command instructs the adapter to generate a dump file. The dump file is stored on the adapter as the /dbg/dump.bin object. Once the dump file has been generated, it can be retrieved from the adapter using the dump command (dump (Firmware Dump)). Also see dump-to-host (Generate Dump to Host).
Note: This command is applicable to LPe16000/LPe16002 HBAs only.
Syntax
gendump
Example
Generate a dump:
elxsdkutil gendump

help

This command displays a list of the elxsdkutil commands with several examples. To get the syntax and usage for a particular command, add the command name.
Syntax
help [<command>]
Example
List the usage information for connection-info:
elxsdkutil help connection-info
Output
Command: connection-info [-d <devicenum>] [–host <hostname>]
[–connection-handle <handle>]

Usage: If a connection handle is provided, reports information on
that connection. If no connection handle is provided, displays a
list of open connections.

linkcfg-get (Get Link Configuration)

This command displays the link configuration. Also see linkcfg-set (Set Link Configuration).
Note: This command is applicable to LPe16000/LPe16002 HBAs only.
Syntax
linkcfg-get [-d <devicenum>] [–host <hostname>]
Example
Display the link configuration on device 0:
elxsdkutil linkcfg-get
Output
Link config: FC_2x16G

linkcfg-set (Set Link Configuration)

This command sets the Fibre Channel and Ethernet link configuration.
The possible <link config> values are:

  • FC_2x16G
  • FC_4x1G
  • FC_4x8G
  • ETH_1x40G
  • ETH_2x10G
  • ETH_2x10G_FC_2x8G
  • ETH_4x10G

Also see linkcfg-get (Get Link Configuration).

Note: This command is applicable to LPe16000/LPe16002 HBAs only.
Syntax
linkcfg-set [-d device] [–host <hostname>] –linkcfg <link config>
Example
Set the link configuration on device 1 for two FC ports running at 16G each:
elxsdkutil link-set -d 1 –linkcfg FC_2x16G

list (List Adapters)

This command displays a list of the Emulex adapters installed in the system. This includes the model number, number of ports, firmware version, and serial number.
Syntax
list [–host <hostname>]
Example
List the Emulex adapters that are installed in a system:
elxsdkutil list

mgmt-info (Management Information)

This command uses the management API (as described in Device Management API) to retrieve all available status values, configuration values, and actions from the driver. For status, each property is displayed along with its current value. For actions, only the name of the action is displayed.
Syntax
mgmt-info [-d <devicenum>] [–host <hostname>]

objenum (Objects Enumerate)

This command enumerates the device file system objects.
Note: This command is applicable to LPe16000/LPe16002 HBAs only.
Syntax
objenum [-d <devicenum>] [–host <hostname>]
Example
List device file system objects on device 0:
elxsdkutil objenum

read (Read Object File)

This command reads an object file from an adapter’s flash.
Note: This command is applicable to LPe16000/LPe16002 HBAs only.
Syntax
read [objname] [-d <devicenum>] [-f <filename>] [–host <hostname>]
Example
Read firmware dump file from device 0 into the “myfile” file:
elxsdkutil read /dbg/dump.bin –d 0 –f myfile

read-link-status (Read Link Status)

This command reads the status of the link. Using the “–clof” option clears the overflow flags and the “–clrc” option clears all counters.
Note: This command is applicable to LPe16000/LPe16002 HBAs only.
Syntax
read-link-status [-d <devicenum>] [–clof] [–clrc]
Example
Read the status of the link for device 0:
elxsdkutil read-link-status

read-rev (Read Adapter Version)

This command reads the version of the adapter.
Syntax
read-rev [-d <devicenum>] [–host <hostname>]
Example
Read the version of device 2:
elxsdkutil read-rev -d 2

read-status (Read Device Status)

This command reads the status of the device. Using the “–cc” option clears the counters.
Note: This command is applicable to LPe16000/LPe16002 HBAs only.
Syntax
read-status [-d <devicenum>] [–cc] [–host <hostname>]
Example
Read the status of device 0:
elxsdkutil read-status

remove-vport (Remove Vport)

This command removes a Vport. The WWNN and WWPN values are in a format of eight pairs of hexadecimal digits separated by colons (for example, 10:00:00:00:c9:01:02:03).
If the WWNN and WWPN values were assigned by the SLI Port (for example, through create-vport (Create Vport)), these values can be found in /var/log/messages.
Note: This command is applicable to LPe16000/LPe16002 HBAs only.
Syntax
remove-vport <WWNN> <WWPN> [-d <devicenum>] [–host <hostname>]
Example
Remove a Vport from device 0:
elxsdkutil remove 20:00:00:00:c9:01:02:03 10:00:00:00:c9:01:02:03

set-mac (Set MAC Address)

This command “soft” assigns a MAC address to a device. The MAC address is in a format of six pairs of hexadecimal digits separated colons, for example, 01:23:45:67:89:ab.
Note: This command is applicable to iSCSI only.
Syntax
set-mac ##:##:##:##:##:## [-d <devicenum>]
Example
Assign a MAC address to device 0:
elxsdkutil set-mac 00:00:C9:D5:6A:A3

sfp (SFP EEPROM Data)

This command retrieves the SFP serial EEPROM data. For OCe11102 adapters, the SFP pages A0 and A2 are returned. For LPe16000/LPe16002 HBAs, the SFP page A0 is returned.
Syntax
sfp [-d <devicenum>] [–host <hostname>]
Example
Print hexadecimal diagnostic information from the transceiver (device 0):
elxsdkutil sfp -d 0

show-ips (Show IPs)

Show the IP addresses, in IPv4 or IPv6 format, that are assigned to an iSCSI adapter. The <ip version 4/6> value is either 4 (IPv4) or 6 (IPv6). Also see add-ip (Add IP).
Note: This command is applicable to iSCSI only.
Syntax
show-ips <ip version 4/6> [-d <devicenum>] [–host <hostname>]
Example
The following sequence first shows the current IPs in IPv4 format on device 2; adds an additional IP address; and then shows the IPs again:
elxsdkutil show-ip 4 -d 2
IP addresses on device 2:
20.0.0.108 255.255.255.0
elxsdkutil add-ip 20.0.0.120 255.255.255.0 -d 2
elxsdkutil show-ips 4 -d 2
IP addresses on device 2:
20.0.0.108 255.255.255.0
20.0.0.120 255.255.255.0

show-mac (Show MAC)

This command displays the MAC address of a device.
Note: This command is applicable to iSCSI only.
Syntax
show-mac [-d <devicenum>] [–host <hostname>]
Example
Display the MAC address of device 3:
elxsdkutil show-mac -d 3

version (Version of Program)

This command prints the program version and exits.
Syntax
version [–host <hostname>]
Example
Print the program version:
elxsdkutil version

write (Write Firmware Image)

This command downloads firmware from a file to the adapter’s flash.
Syntax
write -f <filename> [-d <devicenum>] [–host <hostname>]
Example
Write firmware image to device 0:
elxsdkutil write -f myfile -d 0