NVIDIA UFM-SDN Appliance Command Reference Guide v4.10.0
NVIDIA UFM-SDN Appliance Command Reference Guide v4.10.0

Using Command Line Interface

wUFM-SDN Appliance is equipped with an industry-standard command line interface (CLI). The CLI is accessed through SSH or Telnet sessions or directly through the console port on the front panel, if it exists. This page explains how to use the CLI of UFM-SDN Appliance.

The CLI has the following modes, and each mode makes available a different set of commands for execution. The different CLI configuration modes are:

Mode/Context

Description

standard

When the CLI is launched, it begins in Standard mode. This is the most restrictive mode and only has commands to query a restricted set of state information. Users cannot take any actions that directly affect the system, nor can they change any configuration.

enable

The "enable" command moves the user to Enable mode. This mode offers commands to view all state information and take actions like rebooting the system, but it does not allow any configuration to be changed. Its commands are a superset of those in Standard mode. To return to Standard mode, enter "disable" or "exit".

config

The "configure terminal" command moves the user from Enable mode to Config mode. Config mode is allowed only for user accounts in the "admin" role (or capabilities) – see Users, Roles and Capabilities. This mode has a full unrestricted set of commands to view anything, take any action, or change any configuration. Its commands are a superset of those in Enable mode. To return to Enable mode, enter "exit" or "no configure". Note that moving directly from/to Standard mode to/from Config mode is not possible.

config ufm

Configuration mode for UFM interface. Config ufm mode is allowed only for user accounts in the "admin" role (or capabilities) – see Users, Roles and Capabilities. This mode has a full unrestricted set of commands to view anything, take any action, or change any configuration. Its commands are a superset of those in config mode and enables you to configure UFM-related commands.

config interface management

Configuration mode for management interfaces

Any configuration mode

Several commands such as "show" can be applied within any context

To help you identify the different parts of a CLI command, the following table explains conventions of presenting the syntax of commands.

Syntax Convention

Description

Example

< > Angled brackets

Indicate a value/variable that must be replaced. mtu <value>

value – MTU size in MB

<1...65535> or <interface>

[ ] Square brackets

Enclose optional parameters.
However, only one parameter out of the list of parameters listed can be used. The user cannot have a combination of the parameters unless stated otherwise.

[destination-ip | destination-port | destination-mac]

{ } Braces

Enclose alternatives or variables that are required for the parameter in square brackets.

[mode {active | on | passive}]

| Pipe

Identify mutually exclusive choices.

active | on | passive

Warning

Do not use the angled or square brackets, vertical bar, or braces in command lines. This guide uses these symbols only to show the different entry types.

Warning

CLI commands and options are in lowercase and are case-sensitive.
For example, when you enter the enable command, enter it all in lowercase. It cannot be ENABLE or Enable. Text entries you create are also case-sensitive.

The prompt always begins with the hostname of the system. What follows depends on what command mode the user is in. To demonstrate by example, assuming the machine name is "ufm-sdn-app", the prompts for each of the modes are:

Copy
Copied!
            

ufm-sdn-app > (Standard mode) ufm-sdn-app # (Enable mode) ufm-sdn-app (config) # (Config mode)

The following session shows how to move between command modes:

Copy
Copied!
            

ufm-sdn-app > (You start in Standard mode) ufm-sdn-app > enable (Move to Enable mode) ufm-sdn-app # (You are in Enable mode) ufm-sdn-app # configure terminal (Move to Config mode) ufm-sdn-app (config) # (You are in Config mode) ufm-sdn-app (config) # exit (Exit Config mode) ufm-sdn-app # (You are back in Enable mode) ufm-sdn-app # disable (Exit Enable mode) ufm-sdn-app > (You are back in Standard mode)

Commands entered do not print any response and simply show the command prompt after you press <Enter>.

If an error is encountered in executing a command, the response will begin with "%", followed by some text describing the error.

You may request context-sensitive help at any time by pressing "?" on the command line. This will show a list of choices for the word you are on, or a list of top-level commands if you have not typed anything yet.
For example, if you are in Standard mode and you type "?" at the command line, then you will get the following list of available commands.

Copy
Copied!
            

ufm-sdn-app > ? cli Configure CLI shell options enable Enter enable mode exit Log out of the CLI help View description of the interactive help system no Negate or clear certain configuration options show Display system configuration or statistics slogin Log into another system securely using ssh switch Configure switch on system telnet Log into another system using telnet terminal Set terminal parameters traceroute Trace the route packets take to a destination switch >

If you type a legal string and then press "?" without a space character before it, then you will either get a description of the command that you have typed so far or the possible command/parameter completions. If you press "?" after a space character and "<cr>" is shown, this means that what you have entered so far is a complete command, and that you may press Enter (carriage return) to execute it.

Try the following to get started:

Copy
Copied!
            

? show ? show c? show clock? show clock ? show interfaces ? (from enable mode)

You can also enter "help" to view a description of the interactive help system.
Note also that the CLI supports command and/or parameter tab-completions and their shortened forms. For example, you can enter "en" instead of the "enable" command, or "cli cl" instead of "cli clear-history". In case of ambiguity (more than one completion option is available, that is), then you can hit double tabs to obtain the disambiguation options. Thus, if you are in Enable mode and wish to learn which commands start with the letter "c", type "c" and click twice on the tab key to get the following:

Copy
Copied!
            

ufm-sdn-app # c<tab> clear cli configure ufm-sdn-app # c

This signifies that there are three commands that start with the letter "c": clear, cli and configure.

Several config commands feature a "no" form whose purpose is to reset a parameter value to its inherited or default value, or to disable a configuration.

The command sequence below performs the following:

  1. Displays the current CLI session option.

  2. Disables auto-logout.

  3. Displays the new CLI session options (auto-logout is disabled).

  4. Re-enables auto-logout (after 15 minutes).

  5. Displays the final CLI session options (auto-logout is enabled).

    Copy
    Copied!
                

    // 1. Display the current CLI session options ufm-sdn-app (config) # show cli CLI current session settings: Maximum line size: 8192 Terminal width: 157 columns Terminal length: 60 rows Terminal type: xterm Auto-logout: 15 minutes Paging: enabled Progress tracking: enabled Prefix modes: enabled ... // 2. Disable auto-logout ufm-sdn-app (config) # no cli session auto-logout // 3. Display the new CLI session options ufm-sdn-app (config) # show cli CLI current session settings: Maximum line size: 8192 Terminal width: 157 columns Terminal length: 60 rows Terminal type: xterm Auto-logout: disabled Paging: enabled Progress tracking: enabled Prefix modes: enabled ... // 4. Re-enable auto-logout after 15 minutes ufm-sdn-app (config) # cli session auto-logout 15 // 5. Display the final CLI session options ufm-sdn-app (config) # show cli CLI current session settings: Maximum line size: 8192 Terminal width: 157 columns Terminal length: 60 rows Terminal type: xterm Auto-logout: 15 minutes Paging: enabled Progress tracking: enabled Prefix modes: enabled ...

CLI Filtration Options "include" and "exclude"

The UFM-SDN appliance CLI supports filtering "show" commands to display lines containing or excluding certain phrases or characters. To filter the outputs of the "show" commands use the following format:

Copy
Copied!
            

ufm-sdn-app (config) # <show command> | {include | exclude} <extended regular expression> [<ignore-case>] [next <lines>] [prev <lines>]

The filtering parameters are separated from the show command they filter by a pipe character (i.e. "|"). Quotation marks may be used to include or exclude a string including space, and multiple filters can be used simultaneously. For example:

Copy
Copied!
            

ufm-sdn-app (config) # <show command> | {include <extended regular expression>} [<ignore-case>] [next <lines>] [prev <lines>] | exclude <extended regular expression> [<ignore-case>] [next <lines>] [prev <lines>]]

Example for "include":

Copy
Copied!
            

ufm-sdn-app (config) # show clock | include Time Time: 15:46:54 Time zone: UTC

Example for "exclude":

Copy
Copied!
            

ufm-sdn-app (config) # show clock | exclude Time Date: 2020/08/07 (Etc/UTC)


CLI Monitoring Option "watch"

Running this command displays a show-command output that is updated at a time interval specified by the "interval" parameter (2 seconds is the default).

Copy
Copied!
            

ufm-sdn-app (config) # <show command> | watch [diff] [interval <1-100 secs>]

The "diff" parameter highlights the differences between each iteration of the command.

For example running the command "show power | watch diff interval 1" yields something similar to the following:

Copy
Copied!
            

----------------------------------------------------------------------- Module Device Sensor Power Voltage Current Feed Status [Watts] [Watts] [Amp] ----------------------------------------------------------------------- PS1 power-mon input 85.00 230.00 0.38 AC OK PS2 power-mon - - - - - FAIL   Total power used : 85.00 Watts Total power capacity : 460.00 Watts Total power available : 375.00 Watts Maximum consumed power of all turned on modules: 46.00 Watts

With the highlighted black blocks indicating the change that has occurred between one iteration of the command from one second to the next.

To exit "watch" mode, press Ctrl+C. The "watch" option may be used in conjunction with the "include" and "exclude" options as follows:

Copy
Copied!
            

ufm-sdn-app (config) # <show command> | {include | exclude} <extended regular expression> | watch [diff] [interval <1-100 secs>]

It is possible to count the number of lines in an output of a "show" command by using the following:

Copy
Copied!
            

ufm-sdn-app (config) # <show command> | count

For example:

Copy
Copied!
            

ufm-sdn-app (config) # show clock | count 4


CLI "json-print" Option

The UFM-SDN appliance CLI supports printing "show" commands in JSON syntax.

To print the output of the show commands as JSON, use the following format:

Copy
Copied!
            

ufm-sdn-app (config) # <show command> | json-print

Running the command displays an output of the show command in JSON syntax structure instead of its regular format. For example:

Copy
Copied!
            

ufm-sdn-app (config) # show ftp-server FTP server enabled: no ufm-sdn-app (config) # show ftp-server | json-print { "FTP server enabled": "no" }

The "json-print" option cannot be used together with filtering ("include" and "exclude") and/or monitoring ("watch").

CLI Shortcuts

The following table presents the available keyboard shortcuts for the UFM-SDN CLI.

Key Combination

Description

Ctrl-a

Move cursor to beginning of line

Ctrl-b

Move cursor backward one character without deleting

Ctrl-c

Terminate operation

Ctrl-d

If cursor is in the middle of the line, delete one character forward
If cursor is at the end of the line, show autocomplete options for current word or word fragment
If cursor at an empty line, same as Esc

Ctrl-e

Move cursor to end of line

Ctrl-f

Move cursor forward one character

Ctrl-h

Delete one character backwards from cursor

Ctrl-i

Auto-complete current word (same as TAB)

Ctrl-j

Return carriage (same as ENTER)

Ctrl-k

Delete line after cursor

Ctrl-l

Clear screen and show line at the top of terminal window

Ctrl-m

Return carriage (same as ENTER)

Ctrl-n

Next line (same as DOWN ARROW)

Ctrl-p

Next line (same as UP ARROW)

Ctrl-t

Transpose the two characters on either side of cursor

Ctrl-u

Delete line

Ctrl-w

Delete the last word

Ctrl-y

Retrieve ("yank") last item deleted

Esc b

Move cursor one word backward

Esc c

Capitalizes first letter in word after cursor

Esc d

Delete one word forward from cursor

Esc f

Move one word forward from cursor

Esc l

Change word after cursor to lowercase letters

Esc Ctrl-h

Delete one word backward from cursor

Esc [ A

Next line (same as DOWN ARROW)

Esc [ B

Next line (same as UP ARROW)

Esc [ C

Move forward one character from cursor

Esc [ D

Move backward one character from cursor

The following table describes the predefined users and their roles and capabilities. The roles described below can be assigned to new users and to existing ones as well.

Username

Role and Capability

Description

admin

System Administrator

Can perform all operations allowed to System Administration group for both Appliance Management and UFM Application

ufmsysadmin

UFM System Administrator

Can perform all operations allowed to Fabric Administration group

ufmfabadmin

UFM Fabric Administrator

Can perform all operations allowed to Fabric Operator group users, and can also create, delete, and modify environments and global networks

ufmfaboperator

UFM Fabric Operator

Can perform all operations allowed to Monitoring group users, and can also configure fabric, modify the fabric design, define logical objects, and allocate resources.
Fabric Operator group users cannot create, delete or modify environments or global networks.

ufmfabmonitor

UFM Monitoring Only

Can see the fabric configuration, open monitoring sessions, define monitoring templates, and export monitoring data to CSV files

ufmportalmanager

Multi-site Portal Administration

Multi-site Portal Administration group

ufmportaluser

Multi-site Portal Monitoring

Multi-site Portal Monitoring group

© Copyright 2023, NVIDIA. Last updated on Sep 6, 2023.