Using the Solace CLI

The Solace Command Line Interface (CLI) is a text-based interface for configuring and monitoring Solace routers. It allows a user to perform router administration, configuration and provisioning, and network troubleshooting tasks. The CLI automatically starts after the router powers up.

You can access the CLI through either a console connection to the router or through a Secure Shell (SSH) connection.

The CLI supports command completion, so you do not need to enter the entire name of a command or option. If you enter part of a command then press the Tab key, the CLI lists the options you can enter at that point in the command string. As long as you enter enough characters of the command or option name to avoid ambiguity with other commands or options, the CLI can understand what you are typing and complete it.

Logging On to the CLI

You can log on to the CLI through either management console or Secure Shell (SSH) connections.

At initial log on to the router without an IP address, you must set up a management console (see Connecting Management Consoles), and connect it directly to the router’s RS-232 serial console port located on the rear panel of the router using the provided cable.

Once an IP address is assigned, you can log on to the CLI through SSH. To log on through SSH, SSH version 2.0 client software must be installed on your host computer. Solace routers use Keyboard/Interactive authentication for SSHv2. Ensure that you enable Keyboard/Interactive authentication on the SSH client you are using with the Solace router.

Note:  When a user successfully logs in or logs out, or fails to authenticate for a CLI, SEMP, shell, scp, or sftp session to the router, an authentication event is written to the event log.

There is a limit of eight active and concurrent CLI user sessions per Solace router, not including the always available serial console port that is accessible at the rear of a Solace appliance. This limit does not apply to File Transfer user accounts.

Note:  If there are no free CLI sessions when the user attempts to log on, no other SSH client can log in to the SSH server. The log on will fail, and the error message “Max CLI sessions are already active” is returned to the user. If this should occur, use the SSH command parameter force to override and disconnect the most idle CLI user session (for example, ssh soladmin@solace1 force). However, the use of the force option only disconnects the most idle user. You then have to log on a second time without the force option to occupy the free CLI user session. Also, use of this option does not force any user session out if there are free CLI sessions already available.

At initial log on, general access to the Solace router is established when the following prompt appears on your computer screen:

login>

Enter a valid CLI user account name:

login as: <assigned_user_name>

When you are prompted for a password, enter the assigned password for the user account:

Password: <assigned_password>

Once CLI connectivity to the router is established, a CLI banner and prompt appears:

System Software. SolOS Version <version number>

Copyright 2004-20<xx> Solace Systems, Inc. All rights reserved.

solace>

At this prompt (>), you are at the User EXEC level of the CLI command structure.

Note:  If you are logging in to a newly deployed router, and CLI user accounts have not yet been provisioned, you can login to the router using the default admin CLI user account name (admin) and password (admin). For security reasons, Solace recommends that a system administrator change the default password for the admin user account once the initial SolOS software configuration is completed. For information on managing CLI user accounts, refer to Managing Management User Authentication/Authorization.

Setting CLI Paging Output

By default, the CLI limits the number of lines that are displayed for show commands according to your current screen size.

To set a specific number of lines to use for paging output, enter the following User EXEC command:

solace> paging [size <size>]

Where:

size <size> specifies the number of lines to limit the output page size to. Valid values are 1 through 2147483647.

Note:  The no version of this command (no paging) disables paging.

Setting a CLI Inactivity Timeout

The CLI has an inactivity timer which, by default, automatically logs out inactive CLI users if no commands are entered for five minutes.

To change the inactivity timeout value for CLI user sessions on a router, move to the Console CONFIG level, and enter the following commands:

solace> enable

solace# configure

solace(configure)# console timeout <idle-timeout>

Where:

<idle-timeout> is an integer value representing the inactivity timeout in minutes. The valid range is 1 to 43200. To disable the inactivity timer, enter 0.

Changing CLI Inactivity Timeout for Single Sessions

You can change the CLI inactivity timer just for the current CLI user session instead of globally. The per-session CLI inactivity timeout setting overrides the global timeout setting, but it is not persistent across all CLI user sessions on the router.

To change the CLI inactivity timeout setting for your current CLI user session on the Solace router, enter the following commands:

solace> enable

solace# session timeout <idle-timeout>

Where:

<idle-timeout> is the integer value representing the inactivity timeout value in minutes. The valid range is 0 to 43200. To disable the inactivity timer, enter 0.

Displaying CLI Inactivity Timeout Settings

To show the global inactivity timeout configuration for all CLI user sessions on the Solace router, enter the following User EXEC command:

solace> show console

Example:

solace> show show console

Inactivity timeout : <disabled>

Baud Rate : 115200

To show the inactivity timeout configuration for all current CLI user sessions on the Solace router, enter the following User EXEC command:

solace> show session

Example:

solace> show session

 Session User    From             Login               Idle            Timeout

-------- ------- ---------------- ------------------- --------------- --------

     * 1 solace1 192.168.1.35     2008-11-28 16:18:27 00:00:00        90

       2 solace2 192.168.1.246    2008-11-28 16:21:25 00:00:16        0

* indicates current session

Adding CLI Login Banner Text

An administrator can configure a custom text banner to be displayed when CLI users and File Transfer users login to a Solace router through either serial management console or SSH connections. The login banner text will be displayed before the user is prompted for a password.

Note:  By default, no login banner is used.

The configured login banner text is saved so that it will continue to be used if the Solace router's SolOS version is upgraded. If the Solace router is upgraded and the banner text is modified, then the Solace router is subsequently downgraded to the previous SolOS version, and the banner text used for the older SolOS version is used.

When Solace routers are deployed as high-availability (HA) redundant pairs, the login banner text is automatically synchronized between mates when the Config‑Sync facility is enabled (refer to in Using Config-Sync).

To configure a login banner text, enter the following commands:

solace> enable

solace# configure

solace(configure)# console

solace(configure/console)# login-banner [{text <banner-text>} | {file <file-name>}]

Where:

text <banner-text> directly specifies the banner text to display when a CLI or File Transfer user logs in. <banner-text> is the banner text (up to 2,048 characters in length) to display. Standard CLI escape characters are accepted (refer to Inputting Non-Printable Characters as CLI Parameters). Use “\n” to insert new lines on the CLI (for example, the following banner text would display on three separate lines in the CLI: “Warning!\nProperty of Company X.\nAny unauthorized access is strictly prohibited.”).

file <file-name> specifies to use a file that provides the banner text to display. <file-name> is a string text (up to 255 characters in length) that provides the name of the file to load from the jail file system directory (for example, jail/corporateLoginBannerFile).

Note:  The no version of this command (no login-banner) clears the login banner.

Displaying the CLI Login Banner Text

To show any custom text banner that is displayed when CLI users and File Transfer users login to a Solace router, enter the following User EXEC command:

solace> show console login-banner

Command Levels

The CLI uses the following types of commands:

  • EXEC commands
  • CONFIG commands

EXEC Commands

There are three levels of executive (EXEC) commands:

  • User EXEC—Lets you view basic system information and perform simple tasks such as pings, Show commands, and verify connectivity. You cannot make any changes to the router configuration.

    User EXEC level commands are at the top of the CLI hierarchy. These are the first commands that you have access to when you connect to the device through the CLI.

    To make router configuration change, you must move to other levels of the CLI hierarchy. You can enter the User EXEC level command enable to go to the Privileged EXEC level, from which you can reach other more powerful configuration command levels. For more information, refer to Reaching Other CLI Command Levels.

  • Privileged EXEC—Lets you use the same commands as those at the User EXEC level plus configuration commands that do not require saving the changes to the system-config file. The Privileged EXEC level commands primarily enable you to transfer and store software images and configuration files between the network and the router and to review the configuration.

    From the Privileged EXEC level, you can enter the admin command to reach the Admin EXEC level, or you can enter the configure command to reach the Global CONFIG level.

  • Admin EXEC—Lets you use the same commands as those at the User EXEC and Privileged EXEC level plus commands that are service‑effecting for configured entities (for example, disconnecting clients or deleting spooled messages). Again, these commands do not require saving the changes to the system-config file.

CONFIG Commands

Configuration (CONFIG) commands let you make configuration changes to the Solace router. Each configuration command takes effect immediately after it is entered and is saved to the system-config file maintained in the internal router database. This allows configuration changes to remain in effect after a router restart.

The Global CONFIG command level is the first level you enter into from the Privileged EXEC level. The Global CONFIG level allows you to globally apply or modify parameters on the router.

For example, within the Global CONFIG level you can:

  • apply features globally to a router
  • configure, enable, or disable a feature or function
  • access all CONFIG modes

To reach the Global CONFIG level, enter configure at the privileged EXEC level.

Example:

solace# configure

solace(configure)#

The CLI is now at the Global CONFIG level. From this level, you can enter into one of many other CONFIG sub‑levels, depending on what it is you want to configure on a Solace router (for example, Interface CONFIG or Client Username CONFIG).

Identifying Command Context

Command levels set a context for the CLI, which can help you to:

  • determine where you are in CONFIG command levels
  • determine what you are configuring
  • go to other CLI command levels

Each command level has its own distinct CLI command prompt to let you know which level you are in at any given point and prevent you from making configuration mistakes that could adversely affect the operation of Solace routers.

As shown in the following table, the CLI command prompt that follows the router hostname (solace1 for this example and most examples throughout the Solace customer documentation) changes at each level of the command structure to easily identify the current level.

Command Context

Command Level

CLI Prompt

User EXEC

solace1>

Privileged EXEC

solace1#

Admin EXEC Level

solace1(admin)#

Global CONFIG

solace1(configure)#

Reaching Other CLI Command Levels

To make changes to the router configuration, you must move from the User EXEC level of the CLI command structure (the level that you are at after establishing CLI connectivity) and go to other levels of the CLI hierarchy. The relationship of the primary CLI command levels is shown below.

CLI Command Level Relationship

To reach Privileged EXEC level commands from the User EXEC level, enter the following commands:

solace> enable

solace#

From the Privileged EXEC level, you can reach the Admin EXEC or Global CONFIG levels.

  • To reach Admin EXEC level commands from the Privileged EXEC level, enter the following commands:

    solace# admin

    solace(admin)#

  • To reach Global CONFIG level commands from the Privileged EXEC level, enter the following commands:

    solace# configure

    solace(configure)#

    From the Global CONFIG level, you can reach feature-specific levels of the CONFIG command structure.

    Example:

    solace(configure)# service

    solace(configure/service)#

    The CLI moves to the Service CONFIG level.

Moving Back Command Levels

To move back command levels, you can use the following commands:

  • End—Lets you exit the current CONFIG command level of the CLI and return to the Privileged EXEC level.

    Example:

    solace(configure/message-spool)# end

    solace#

  • Exit—Lets you exit the current command level of the CLI and return to the previous level. At the User EXEC level, the exit command will result in an exit from the CLI.

    Example:

    solace(configure/client-profile)# exit

    solace(configure)#

  • Home—Lets you exit the current command level of the CLI and return to the User EXEC level.

    Example:

    solace(configure/routing)# home

    solace>

CLI Command Structure

Many CLI commands require textual or numeral input as part of the command. These fields may be required or optional, depending on how the information is bracketed. For clarity, a few CLI command examples are provided below.

Example 1

logging debug {<subsystemId> | all} [level <level>] [mask <mask>]

When an item is bracketed with < > symbols, the information requested is a variable and is required.

When an item is enclosed with [ ] symbols, the information requested is optional.

When an item is enclosed by { } symbols, the information requested is a variable of which only one is required.

When an item is not enclosed by < >, [ ], or { } symbols, the item is a required keyword.

When two or more options are separated by a | symbol, you must enter one of the options as part of the command.

To get a quick display of available options at a CLI level or for the next option in a command string, enter a single question mark (?) at the prompt, or press the Tab key.

Example 2

To view all available commands at the user EXEC level, enter a double question mark (??) at that level:

solace> ??

 

 Commands available in the current mode:

            enable - Use this command to enter the Privileged EXEC level of

                     the CLI to perform appliance configuration.

 

   Global commands available in any mode:

       [no] alarm-display          - Use this command to enable the display

                                     of 3200 Series appliance system alarms in

                                     the current CLI session on a

                                     sesqsion-by-session basis. The no version

                                     disables the displaying of appliance system

                                     alarms in the current CLI session.

            cd                     - Use this command to change the current

                                     working directory on the appliance.

            dir                    - Use this command to list the contents of

                                     a directory on the appliance.

            end                    - Use this command to exit the current

                                     CONFIG command level of the CLI and

                                     return to the Privileged EXEC level.

            exit                   - Use this command to exit the current

                                     command level of the CLI and return to

                                     the previous level. From the User EXEC

                                     level, use it to exit the CLI.

            help                   - Use this command to display the Help

                                     facility for the command line interface.

            home                   - Use this command to exit the current

                                     command level of the CLI and return to

                                     the User EXEC level.

            logout                 - Use this command to log out of a current

                                     CLI session.

            more                   - Use this command to display the contents

                                     of a text file in a directory.

       [no] paging                 - Use this command to control the output

                                     page size for show commands. The no

                                     version disables paging.

            ping                   - Use this command to send ICMP

                                      ECHO_REQUEST packets to a specified

                                     host.

            pwd                    - Use this command to display the present

                                     working directory (pwd).

            session                - Use this command to change the CLI

                                     inactivity timeout setting for your

                                     current CLI user session on the 3200

                                     Series appliance.

            show                   - Use this command to display a variety of

                                     configuration and statistical

                                     information about the appliance.

            source                 - Use this command to run a cli script.

       [no] strict-column-wrapping - By default, this is enabled. Use the

                                     'no' version of this command to allow

                                     designated columns to be displayed

                                     without wrapping. A column may be

                                     designated to be controlled by this

                                     setting if it is identified as a column

                                     where the content would need to be

                                     frequently cut and pasted. This is more

                                     easily performed if the content is not

                                     wrapped.

            tree                   - Use this command to show the CLI command

                                     tree, starting from the current mode.

 

    Complete help for a command can be displayed by entering:

         "<command> ?"

 

   Output of any command can be redirected to overwrite a file using '>':

         "show version > version.txt"

 

   Output of any command can be redirected to append to a file using '>>':

         "show version >> version.txt"

 

solace>

Note:  You also can enter a question mark (?) with an individual command, to see all available options or to check context.

Example 3

To view possible show command options, enter the following User EXEC command:

solace> show ?

 

COMMAND:

       show [acl-profile ... | alarm | authentication ... | backup |

             bridge ... | cache-cluster ... | cache-instance ... |

             client ... | client-profile ... | client-username ... |

             clock ... | compression | config-sync ... | console | cspf ... |

             current-config | debug ... | deferred-config | disk ... |

             distributed-cache ... | dns | environment | hardware ... |

             hostname | interface ... | ip ... | jndi ... | kerberos ... |

             ldap-profile ... | log | logging ... | memory |

             message-spool ... | message-vpn ... | ntp-server | paging |

             process ... | product-key | queue ... | radius-profile ... |

             redundancy ... | replicated-topic ... | replication ... |

             router-name | routing | sequenced-topic ... | service ... |

             session | smrp ... | snmp ... | ssl ... | stats ... |

             syslog ... | topic-endpoint ... | trusted-root ... |

             username ... | version | xa-transaction ...]

 

   DESCRIPTION:

       Use this command to display a variety of configuration and statistical

       information about the appliance.

 

   MINIMUM REQUIRED SCOPE/ACCESS LEVEL:

       global/none

 

   PARAMETERS:

       acl-profile            - Show ACL profile information

       alarm                  - Show current alarm status

       authentication         - Show authentication parameters for a class of

                                users

       backup                 - Show information on configuration backups

       bridge                 - Show bridge information

       cache-cluster          - Show the contents of the distributed-cache

                                cluster

       cache-instance         - Show the contents of the distributed-cache

                                instance

       client                 - Show client information

       client-profile         - Show client-profile information

       client-username        - Show client-username information

       clock                  - Show system clock

       compression            - Show compression information

       config-sync            - Show config-sync information. With no

                                parameters configuration and basic operational

                                state are displayed.

       console                - Show console configuration

       cspf                   - Show CSPF routing information

       current-config         - Enter show current configuration mode. The

                                subcommands are typically used with output

                                redirection via '>' to create a script of CLI

                                commands to create or remove the requested

                                configuration

       debug                  - Show internal debug information

       deferred-config        - Show the deferred configuration which will be

                                applied on an appliance restart.

       disk                   - Show local disk usage and the RAID status

       distributed-cache      - Show the contents of the distributed-cache

       dns                    - Show Domain Name System (DNS) configuration.

       environment            - Show system environment information

       hardware               - Show system hardware information

       hostname               - Show hostname

       interface              - Show the parameters configured for the

                                interface

       ip                     - Show Internet Protocol Parameters

       jndi                   - Show JNDI configuration

       kerberos               - Show Kerberos authentication information

       ldap-profile           - Show ldap profile settings

       log                    - Show the appliance log

       logging                - Show logging information

       memory                 - Show memory usage

       message-spool          - Show message spool

       message-vpn            - Show message VPN information

       ntp-server             - Show the NTP server

       paging                 - Use this command to control the output page

                                size for show commands. The no version

                                disables paging.

       process                - Show system process information. Given a pid,

                                displays detailed information for that

                                process.

       product-key            - Show installed product-keys and the features

                                they unlock

       queue                  - Show queue information

       radius-profile         - Show radius profile settings

       redundancy             - Show redundancy configuration

       replicated-topic       - Show replicated-topic information

       replication            - Show global replication information

       router-name            - Show router's name

       routing                - Show routing configuration

       sequenced-topic        - Show sequenced-topic information

       service                - Show the port configuration for the

                                protocols/services supported

       session                - Show information regarding currently active

                                CLI sessions.

       smrp                   - Show SMRP routing information

       snmp                   - Show SNMP agent configuration

       ssl                    - Show SSL configuration and state

       stats                  - Show global level stats

       syslog                 - Show the configured syslog destinations

       topic-endpoint         - Show topic-endpoint information

       trusted-root           - Show the trusted root certificate.

       username               - Show the names of all the CLI and file

                                transfer users configured on an appliance

       version                - Show information on software loads

       xa-transaction         - Show xa-transaction information

CLI Command Line Prompts

Within the CLI, the command line prompt identifies both the hostname and the command mode. The hostname is the name of your router set through the setup (or using the hostname Global CONFIG command); the command mode indicates your location within the CLI command structure.

In most cases, Solace customer documentation uses solace as the name of the host. This is the default system hostname.

Example:

solace(configure)# create message-vpn <vpn-name>

When redundancy scenarios are discussed, solace1 is often used for one router and solace2 for its mate.

Example:

solace1(configure)# ip vrf msg-backbone

solace2(configure)# ip vrf msg-backbone

For some actions, the CLI prompts you for a response. The acceptable default responses are the following:

  • You can press <y> to agree with the prompt and continue.
  • You can press <n> to disagree with the prompt and cancel the action.

CLI Keywords and Parameters

CLI commands are made up of two primary elements: keywords and parameters.

  • Keywords

    Every command requires at least one keyword; however, a command can contain other optional keywords. Keywords must be typed into the CLI accurately for it to be recognized. These are examples of keywords:

    • reload
    • clear
    • configure
    • end
    • set

    Keywords identify the operation to be performed. You can abbreviate keywords; however, you must enter enough initial characters to unambiguously identify the command. For example, if the keyword you want to specify is source and you enter only s, an error appears. The error indicates that one or more possible keywords begin with s, thus making your entry ambiguous.

  • Parameters

    Parameters are often required elements of a command; however, for some commands, parameters are not required. A parameter is most often a value that you specify after the keyword. There are different types of parameters, such as strings, integers, or IP addresses. The CLI indicates the type of parameter that you must enter. When you see a range of numbers or uppercase letters, it indicates that you must specify a value.

Keywords and Parameters Together

By combining keywords and parameters in the correct sequence, you can begin to use the CLI to configure and monitor your router. For example, you could specify the hostname Global Config command to change the name that your router was originally assigned on its initially setup (through the setup Privileged EXEC command).

The hostname Global Config command requires a hostname keyword and an associated parameter. In this case, the variable <name> parameter uses a string value of up to 50 characters for the name of the host.

router(configure)# hostname <name>

When you enter the hostname Global Config command, the new hostname appears in the command line prompt.

Example:

router(configure)# hostname solace

solace(configure)#

CLI Command Output Redirection

Rather than require the operator to copy and paste the CLI output from a command from the screen for editing or transferring to another router, you can use the CLI output redirection feature to redirect such output to a file in a specified subdirectory of the router root directory. The output can be redirected to either write a file using “>”, or append a file using “>>”.

For example, to redirect the command output for creating a Message VPN named blue to write the script file blue.cli in subdirectory cliscripts:

solace> show current-config message-vpn blue > cliscripts/blue.cli

Note:  CLI paging is automatically disabled for the duration of a redirected CLI command, but confirmation prompts, error and warning messages are not; they remain displayed on the CLI console.

Partial Keyword <Tab>

At any point in the command line, you can press <Tab> to display the valid inputs onward.

When you cannot recall a complete command name or keyword, type in the first few letters, press <Tab>, and the system will complete your partial entry. However, you must type enough characters to provide a unique abbreviation. If your partially entered command is not unique, the CLI presents you with a list of valid options.

Example:

solace> show message- <Tab>

message-spool message-vpn

solace> show message-sp <Tab>

solace> show message-spool

A subsequent <Tab> will then display the valid parameters for the command / argument pair:

solace> show message-spool< Tab>

detail       message-vpn  rates        stats

* and ? as Input Wildcards

For some commands, the “*” and “?” characters are permitted as wildcards for information requested for command input.

  • The “*” character may match 0 or more unknown characters.

    Examples:

    solace> show message-vpn r*d may display output for Message VPN red.

    solace> show message-vpn red* may display output for Message VPN red or redder.

    solace> show message-vpn * may display output for Message VPN red or redder.

    Note:  The “*” character also can be used as a wildcard for Solace Message Format (SMF) topic subscriptions. For information on its usage for SMF topic subscriptions, refer to Topic Support and Syntax.

  • The “?” character may match only one unknown character.

    Example:

    solace> show message-vpn 1?3 may display output for Message VPN 123 or 13.

    Note:  The “?” character can also be used at the end of a command to display help for that command. For information on its usage for displaying help for commands, refer to Using Help.

Using Help

The Solace CLI provides a variety of useful context-sensitive help features. An important thing to remember about using the help features is that the use of a space or the lack of a space before the “?” character gives different results. The following table summarizes the help system.

Help Commands

Command

Description

?, <Tab>, or tree

Lists all commands or command options available in the current CLI level.

??, help, or tree all

Lists commands or command options available in both the current and global CLI levels.

tree global

Lists commands or command options available in the global CLI levels.

partial-command<Tab>

Completes the partial command you entered, if you have provided an unambiguous abbreviation. If ambiguous, the CLI lists the available command options.

command<space>?

Gives detailed help on the specific command and its available parameters in the current CLI level.

? Command

You can enter the question mark (?) key whenever you need additional information. When you enter ?, all available choices are displayed. When you enter ? on a line by itself, or when it is preceded by one or more spaces, a list of all next available choices is displayed. Refer to ? Command Example 1.

Alternatively, the user can terminate a command with a ? to display the complete help on that command. This feature is useful when the command keyword is known but the list and format of parameters is not. Refer to ? Command Example 2.

? Command Example 1

From the prompt, you can enter ? to display the online help:

solace# ?

 

 Commands available in the current mode:

            admin       - Use this command to reach the Admin EXEC level.

            backup      - Use this command to immediately create a manual

                          local backup of your configuration database file on

                          the appliance.

            boot - Use this command to upgrade or downgrade the appliance

                          software to a new or old SolOS software load and

                          activate it, or to revert to and run the previous

                          SolOS software version that was running before the

                          last upgrade.

            clear       - Use this command to clear various appliance

                          statistics.

 

. . .

 

            setup       - Use this command to quickly set the hostname,

                          interfaces, clock and time zone on the appliance.

            shell       - Use this command to acess the SolOS shell.

 

   Global commands (available in all modes) can be displayed by entering:

         "??"

 

   Complete help for a command can be displayed by entering:

         "<command> ?"

 

   Output of any command can be redirected to overwrite a file using '>':

         "show version > version.txt"

 

   Output of any command can be redirected to append to a file using '>>':

         "show version >> version.txt"

 

solace#

? Command Example 2

You can terminate a CLI command with a ? to display the complete help on the command:

solace(configure)# hardware ?

 

COMMAND:

    hardware [disk ... | message-spool | power-redundancy ... |

              topic-routing]

 

    DESCRIPTION:

        Use this commmand to configure routing modules and disks on the

        appliance.

 

    MINIMUM REQUIRED SCOPE/ACCESS LEVEL:

        global/read-write

 

    PARAMETERS:

        disk                  - Enable/disable hard disk

        no] message-spool     - Configure message spool hardware options

        power-redundancy      - Configure power-redundancy

        [no] topic-routing    - Configure topic routing hardware options

Help Command

You can enter the help command to display a brief description of the context‑sensitive help system.

solace# help

Example:

solace# help

 

 Commands available in the current mode:

            admin       - Use this command to reach the Admin EXEC level.

            backup      - Use this command to immediately create a manual

                          local backup of your configuration database file on

                          the appliance.

            boot        - Use this command to upgrade or downgrade the appliance.

. . .

   Global commands available in any mode:

       [no] alarm-display          - Use this command to enable the display

                                     of 3200 Series appliance system alarms in

                                     the curren CLI session on a

                                     session-by-session basis. The no version

                                     disables the displaying of appliance

                                     alarms in the current CLI session.

            cd                     - Use this command to change the current

                                     working directory on the appliance.

            dir                    - Use this command to list the contents of

                                     a directory on the appliance.

            end                    - Use this command to exit the current

                                     CONFIG command level of the CLI and

                                     return to the Privileged EXEC level

 

. . .

 

   Complete help for a command can be displayed by entering:

         "<command> ?"

 

   Output of any command can be redirected to overwrite a file using '>':

         "show version > version.txt"

 

   Output of any command can be redirected to append to a file using '>>':

         "show version >> version.txt"

Tree Command

You can enter:

  • tree to display a list of commands or command options available in just the current CLI level
  • tree all to display a list of commands or command options available in both the current and global CLI levels
  • tree global to display a list of commands or command options available in just the global CLI level

Example:

 

 GLOBAL COMMANDS - available in all modes:

     [no] alarm-display

     cd [<directory>]

     dir [<pattern>]

     end

     exit

     help

     home

     logout

     more <pattern>

     [no] paging [size <size>]

     ping <vrf-ip-addr-or-host> [ip-interface <ip-interface>]

     pwd

     session timeout <idle-timeout>

     show*

         acl-profile <name> [message-vpn <vpn-name>]

                     [detail[client-connect] [publish-topic]

                     [subscribe-topic] |users]

         alarm

         authentication [user-class cli-semp] [current-user

                        | access-level [{default |

                        ldap [group <group-name-pattern>]}]

                        [detail]]

         backup

 

. . .

 

     source script <script-name> [stop-on-error]

            [no-prompt]

     [no] strict-column-wrapping

     tree [all | global]

 

        * indicates a mode that can be "typed through"

Writing and Running Basic CLI Scripts

To simplify the loading of common or repetitive configuration setups, the CLI has a basic scripting facility that enables you to define and run scripts that run multiple CLI commands. Basic script files can be used to store more than one CLI command. Depending on your needs, you might want to store all of your CLI commands in one script file or group scripts by function.

To run a basic CLI script file, save the script as text, then transfer the script to the router using the copy Privileged EXEC command.

You can then run the basic CLI script file from within the CLI using the following User EXEC command:

solace> source script <script-name> [stop-on-error] [no-prompt]

Where:

<script-name> is the name of the CLI script file. The script file must be in a directory on the router.

stop-on-error specifies to stop running the script when encountering an error.

Note:  Ordinarily, when a CLI script is run, it is run to completion, even if errors are encountered. However, this can prove problematic if a command fails part way through a script and subsequent commands rely on it having run properly. To avoid this scenario, you can use the stop-on-error parameter.

no-prompt specifies to skip yes/no confirmation prompting. It is the equivalent to entering yes to all command prompts.

Note:  Certain CLI commands require a confirmation of the form “Do you want to continue (y/n)” when run. Use of the no-prompt parameter allows CLI scripts to run to completion without interruption.

Always observe these key points when writing or running CLI scripts:

  • The commands in the script must be valid in the current operating mode.
  • Nesting of scripts is allowed, up to a maximum nest level of five.
  • If a command inside a script contains a syntax error, or fails for some other reason, the remainder of the commands in the file are still run (that is, script execution does not abort on failure), provided stop-on-error is not used.
  • A script does not require an exit or logout command at the end. If present, these commands are run normally, such that if run in user mode the CLI session is exited.
  • Comments can be included directly in the CLI script file itself and are identified with an exclamation mark (!) at the start of a line. This tells Solace routers that the information is a comment and should not be displayed or parsed. Comments do not require an end tag.

Note:  If you decide to include comments, anyone who reads or edits your CLI script may read them. Any router or application that parses or validates your CLI script ignores commented information.

NOTICE: The current scripting facility does not include structures for control flow, environment variables, or other more sophisticated scripting features

Inputting Non-Printable Characters as CLI Parameters

Non-printable characters can be inputted in a CLI argument as a 3-digit octal value preceded by a backslash escape character (for example, “\027”), a two digit hexadecimal value preceded by an escaped x: “\x”, or a collection of standard escape sequences: “\a”, “\b”, “\f”, “\n”, “\r”, “\t”, “\\”, and “\"”. The CLI interprets these sequences as a single character whose value is representative of the escaped sequence.

To enter values with spaces, surround them with double quotes (“”).

Note:  If you use pre-existing CLI command scripts that were written for a version of SolOS earlier than Version 6.1 (including the output of legacy show current-config User EXEC command commands) those scripts must be modified before they are executed if they contain octal escape sequences in them. To modify pre‑existing CLI command scripts, escape the escape character in scripts containing any of the documented escape sequences (for example, change the value “\027” to “\\027”). It is also suggested, but not required, that you escape all backslashes to allow for future expansion of the escape sequences.

Retrieving Entered CLI Commands for Reuse

All entered CLI commands are stored on the router in a history buffer. To retrieve these entered commands you can use the keyboard arrow keys to navigate the history buffer. You can then copy these retrieved commands and either reuse them as is, or edit them for reuse.

Displaying System Alarms

To enable the display of Solace router system alarms in the current CLI session, on a session-by-session basis, enter the following User EXEC command:

solace> alarm-display

Note:  The no version of this command (no alarm-display) disables the display of router system alarms in the current CLI session.

To show the current alarm status for the current CLI session, enter the following User EXEC command:

solace> show alarm

Examples:

solace> alarm-display

 

## ATTENTION: Critical System Alarms. Enter "show alarm" to view. ##

 

solace> show alarm

 

Alarm display is enabled.

 

Source        | Slot | Alarm

--------------+------+----------------------------------------------

Chassis Fan 2 |      | Failed