Skip to main content

Command-line interface guidelines

All CMM CLI commands follow the same general syntactical guidelines.

All commands have the following basic structure:

command -option parameter

Some commands do not require options, and some command options do not require parameters. You can add multiple options to a command on one line to avoid repeating the same command. Options that display a value and options that set a value must not be used together in the same command. The following examples illustrate valid command option syntax:

  • command
  • command -option_set
  • command -option_set parameter
  • command -option1_set parameter -option2_set parameter

The information for each option is returned in the order in which it was entered and is displayed on separate lines.

Observe the following general guidelines when you use the command-line interface:

  • Case sensitivity
    All commands, command options, and predefined command option parameters are case sensitive.
    Note
    If you receive a Command not found error, make sure that you are typing the command in the correct case. For a list of valid commands, type help or ?.
  • Data types

    The ip_address data type uses a predefined formatted string of xxx.xxx.xxx.xxx, where xxx is a number from 0 to 255.

  • Delimiters
    • Options are delimited with a minus sign.
    • In a command that requires parameters, a single space is expected between an option and its parameter. Any additional spaces are ignored.
  • Output format
    • Failed commands generate failure messages.
    • Successful commands are indicated by the message OK or by the display of command results.
  • Strings
    • Strings that contain spaces must be enclosed in quotation marks, for example, snmp -cn "John B. Doe".
    • String parameters can be mixed case.
  • The help command lists all commands and a brief description of each command. You can also issue the help command by typing ?. Adding the -h parameter to any command displays its syntax.
  • You can use the Up Arrow and Down Arrow keys in the command-line interface to access the last eight commands that you entered.