Difference between revisions of "Basic Commands"

From OpenFabrics Alliance Wiki
Jump to: navigation, search
(ib_tracert)
Line 59: Line 59:
 
  -m                              show the multicast trace of the specified mlid
 
  -m                              show the multicast trace of the specified mlid
 
  --node-name-map <node-name-map> Specify a node name map. The node name map file maps GUIDs to more user friendly names.
 
  --node-name-map <node-name-map> Specify a node name map. The node name map file maps GUIDs to more user friendly names.
 
=== perfquery ===
 
{{{
 
perfquery uses PerfMgt GMPs to obtain the PortCounters (basic performance and error counters), PortExtendedCounters, PortXmitDataSL, PortRcvDataSL, PortRcvErrorDetails, PortXmitDiscardDetails, PortExtendedSpeedsCounters, or PortSamplesControl from the PMA at the node/port specified. Optionally shows aggregated counters for all ports of node.  Also, optionally, reset after read, or only reset counters.
 
 
Note: In PortCounters, PortCountersExtended, PortXmitDataSL, and PortRcvDataSL, components that represent Data (e.g. PortXmitData and PortRcvData) indicate octets divided by 4 rather than just octets.
 
 
Note: Inputting a port of 255 indicates an operation be performed on all ports.
 
 
Common Flags:
 
# Debugging Flags
 
-d    : raise the IB debugging level.
 
      : May be used several times (-ddd or -d -d -d).
 
-e    : show send and receive errors (timeouts and others)
 
-h    : show the usage message
 
-v    : increase the application verbosity level.
 
      : May be used several times (-vv or -v -v -v)
 
-V    : show the version info.
 
 
# Addressing flags
 
-G    : use GUID address argument. In most cases, it is the Port GUID.
 
      : Example: "0x08f1040023"
 
-s <smlid>:use ’smlid’ as the target lid for SM/SA queries.
 
 
# Other common flags:
 
-C <ca_name>: use the specified ca_name.
 
-P <ca_port>: use the specified ca_port.
 
-t <timeout_ms>: override the default timeout for the solicited mads.
 
 
Multiple CA/Multiple Port Support
 
When no IB device or port is specified, the port to use is selected by the following criteria:
 
  1. the first port that is ACTIVE.
 
  2. if not found, the first port that is UP (physical link up).
 
If a port and/or CA name is specified, the user request is attempted to be fulfilled, and will fail if it is not possible.
 
 
}}}
 
 
=== ibdiagnet ===
 
{{{
 
ibdiagnet scans the fabric using directed route packets and extracts all the available information regarding its connectivity and devices.  It then produces the following files in the output directory (which are defined by the -o option (see below)).
 
 
Common Flag Options:
 
-c <count>      : Min number of packets to be sent across each link (default = 10)
 
-v              : Enable verbose mode
 
-r              : Provides a report of the fabric qualities
 
-u              : Credit loop check based on UpDown rules
 
-t <topo-file>  : Specifies the topology file name
 
-s <sys-name>  : Specifies the local system name. Meaningful only if a topology file is specified
 
-i <dev-index>  : Specifies the index of the device of the port used to connect to the IB fabric (in case of multiple devices on the local system)
 
-p <port-num>  : Specifies the local device’s port num used to connect to the IB fabric
 
-o <out-dir>    : Specifies the directory where the output files will be placed (default = /tmp)
 
-lw <1x|4x|12x> : Specifies the expected link width
 
-ls <2.5|5|10>  : Specifies the expected link speed
 
-pm            : Dump all the fabric links, pm Counters into ibdiagnet.pm
 
-pc            : Reset all the fabric links pmCounters
 
-P <PM=<Trash>> : If any of the provided pm is greater then its provided value, print it to screen
 
-skip <skip-option(s)> :  Skip the executions of the selected checks. Skip options (one or more can be specified) : dup_guids zero_guids pm logical_state part ipoib all
 
-wt <file-name>>:  Write out the discovered topology into the given file. This flag is useful if you later want to check
 
                    for changes from the current state of the fabric. A directory named ibdiag_ibnl is also created by this
 
                    option, and holds the IBNL files required to load this topology. To use these files you will need to set
 
                    the environment variable named IBDM_IBNL_PATH to that directory. The directory is located in /tmp or in
 
                    the output directory provided by the -o flag.
 
-load_db <file-name>> : Load subnet data from the given .db file, and skip subnet discovery stage. Note: Some of the checks require actual subnet discovery, and therefore would not run when load_db is specified. These checks are: Duplicated/zero guids, link state, SMs status.
 
-vlr            : VL based Routing - provide this option to create the paths SL file (psl), SL2VL file (slvl) and use them in credit loops check (if -r option is provided).
 
                  NOTE: Since number of paths is N^2 extracting the PSL file may take some time.
 
-h|--help      : Prints the help page information
 
-V|--version    : Prints the version of the tool
 
--vars          : Prints the tool’s environment variables and their values
 
}}}
 
 
=== ibnetdiscover ===
 
{{{
 
ibnetdiscover performs IB subnet discovery and outputs a human readable topology file. GUIDs, node types, and port numbers are displayed as well as port LIDs and NodeDescriptions. All nodes (and links) are displayed (full topology). Optionally, this utility can be used to list the current connected nodes by nodetype. The output is printed to standard output unless a topology file is specified.
 
 
Common Options:
 
-l, --list        : List of connected nodes
 
-g, --grouping    : Show grouping. Grouping correlates IB nodes by different vendor specific schemes. It may also show the switch external ports correspondence.
 
-H, --Hca_list    : List of connected CAs
 
-S, --Switch_list : List of connected switches
 
-R, --Router_list : List of connected routers
 
-s, --show        : Show progress information during discovery.
 
--node-name-map <node-name-map>: Specify a node name map. The node name map file maps GUIDs to more user friendly names.
 
-p, --ports      : Obtain a ports report which is a list of connected ports with relevant information (like LID, portnum, GUID, width, speed, and NodeDescription).
 
-m, --max_hops    : Report max hops discovered.
 
}}}
 
 
 
 
=== ibportstate ===
 
{{{
 
ibportstate can be used for looking at the current configuration for a port on the fabric as well as reset a particular port on the fabric.  This is handy for some of the leaf switches that don't have any management ability for the switch and you can reset a port on a switch and well as reset the width and speed for that port
 
 
Usage: ibportstate [options] <dest dr_path|lid|guid> <portnum> [<op>]
 
 
Supported ops: enable, disable, reset, speed, espeed, fdr10,
 
width, query, down, arm, active, vls, mtu, lid, smlid, lmc,
 
mkey, mkeylease, mkeyprot
 
 
Options:
 
  --config, -z <config>  use config file, default: /etc/infiniband-diags/ibdiag.conf
 
  --Ca, -C <ca>          Ca name to use
 
  --Port, -P <port>      Ca port number to use
 
  --Direct, -D            use Direct address argument
 
  --Lid, -L              use LID address argument
 
  --Guid, -G              use GUID address argument
 
  --timeout, -t <ms>      timeout in ms
 
  --sm_port, -s <lid>    SM port lid
 
  --show_keys, -K        display security keys in output
 
  --m_key, -y <key>      M_Key to use in request
 
  --errors, -e            show send and receive errors
 
  --verbose, -v          increase verbosity level
 
  --debug, -d            raise debug level
 
  --help, -h              help message
 
  --version, -V          show version
 
 
Examples:
 
  ibportstate 3 1 disable # by lid
 
  ibportstate -G 0x2C9000100D051 1 enable # by guid
 
  ibportstate -D 0 1 # (query) by direct route
 
  ibportstate 3 1 reset # by lid
 
  ibportstate 3 1 speed 1 # by lid
 
  ibportstate 3 1 width 1 # by lid
 
  ibportstate -D 0 1 lid 0x1234 arm # by direct route
 
 
}}}
 

Revision as of 10:45, 28 October 2014

IB Basic Commands

ibstat

 Displays operational information about one or more InfiniBand network devices. This command displays InfiniBand operational
 information pertaining to a specified Host Channel Adapter Device (HCAD). If an HCAD device name is not entered, status for 
 all available HCADs are displayed. Select a flag to narrow down your search results. You can display specific categories of 
 information, including Node, Port, Interface, and Debug information. You can also choose to display all of the information 
 categories.

 Flags:
 -d	Displays current debug setting.
 -h	Displays ibstat command usage.
 -i	Displays network interface information.
 -n	Displays IB node information.
 -p	Displays IB port information.
 -v	Displays all IB device information.

ibv_devinfo

 Print information about RDMA devices available for use from user space.

 Flags:
 -d, --ib-dev=DEVICE   use IB device DEVICE (default first device found)
 -i, --ib-port=PORT    query port PORT (default all ports)
 -l, --list            only list names of RDMA devices
 -v, --verbose         print all available

sminfo

Query InfiniBand SMInfo attribute.
Optionally set and display the output of a sminfo query in human readable format. 
This command indicates where the running SM is.

sminfo: sm lid 250 sm guid 0x2c903004af587, activity count 1828732680 priority 15 state 3 SMINFO_MASTER

ping hostname-ib0

ibping

ibping uses vendor mads to validate connectivity between IB nodes. 
On exit, (IP) ping like output is show. ibping is run as client/server. Default is to run as client. 
Note also that a default ping server is implemented within the kernel.

Flags:
-c            stop after count packets
-f, --flood   flood destination: send packets back to back without delay
-o, --oui     use specified OUI number to multiplex vendor mads
-S, --Server  start in server mode (do not return)

ib_tracert

Traces the path from Source GID/LID to Destinatino GID/LID
Each hop along the path is displayed until the destination is reached or a hop does not respond. 
By using the -m option, multicast path tracing can be performed between source and destination nodes.

Flags:
-n, --no_info                   simple format; don't show additional information
-m                              show the multicast trace of the specified mlid
--node-name-map <node-name-map> Specify a node name map. The node name map file maps GUIDs to more user friendly names.