Sun Management Center 3.5 User's Guide

Basic CLI Commands

The following list describes the basic CLI commands.

alias

Use the alias command to create an alias for frequently used commands or for commands that have complicated parameters. An alias cannot have the same name as an existing CLI command. Whitespace in an alias definition must be enclosed in double-quotes (", ASCII character 0x22). The following example shows a simple alias command first, followed by a more complex alias command.


> alias assign=set
> alias alarms="getAlarms severity=dwn"

If called without arguments, the alias command prints a list of defined aliases and their values. The following example shows the result of the alias command when the command is called without arguments.


> alias
assign - set
alarms - getAlarms severity=dwn
clear

The clear command removes all parameters from the current session. This command is similar to the unset command but does not require parameter names as arguments.

exit

The exit command disconnects from the server and terminates the CLI session.


Note –

There is no difference between the exit and the quit commands.


help

The help command displays information about CLI commands and their parameters. The help information is suitable for displaying on a non-bitmapped terminal screen. When help is executed without an argument, the help displays an alphabetical list and brief description of available CLI commands. Basic commands are listed first, followed by extended commands. When help is called with the name of a CLI command as an argument, help prints information specific to that command. The following example shows help for the getAlarms command.


> help getAlarms
getAlarms [a=host[,host]+] [alarm_filter_list]
 - Get alarm information on an agent or a list of agents under a
set of filter conditions. If no agent is provided, all alarms will
be obtained. All the filter conditions are "ANDED" to provide the
result. The filter conditions as specified in alarm_filter_list
comprises:
  domain=domain and/or
  m=module[+instance] and/or
  managed_object=managed_object and/or
  property=property and/or
  property_instance=property_instance and/or
  qualifier=qualifier and/or
  severity=[DIS,DWN,ERR,OFF,INF,IRR,WRN] and/or
  state=[C,F,O] and/or
  ack=[A,N]
kill

The kill command terminates any commands that are running in the background.

login

The login command establishes a connection to a Sun Management Center server. You can specify the serverHost and, optionally, serverPort parameters as arguments. If no host is specified, you are prompted for a host. The login command also prompts you for your username and password.

logout

The logout command terminates your connection to the Sun Management Center server, but does not terminate the CLI session.

more

The more command displays help information on the parameters that you set to control the format of command output to the screen. Refer to the discussion of the predefined parameters height and more in Predefined Parameters and Flags for additional information.

print

The print command directs the output of the last extended command in the specified format to the specified destination. By default, print directs this output to the terminal screen in plain text format. If the parameters a or o are set, the output is directed to the file specified by those parameters. The output is not shown on the screen.


Note –

The print command is not saved in the command history.


quit

The quit command disconnects from the server and terminates the CLI session.


Note –

There is no difference between the quit and the exit commands.


reset

The reset command restores the values of all parameters that are specified on the command line to the values that were specified at the beginning of the CLI session. Parameters that were defined during the session but not on the command line remain unchanged. If a specific parameter name is supplied as an argument to reset and the parameter was specified on the command line, that parameter's value is restored to its original value. Otherwise, the parameter's value remains unchanged.


Note –

The reset command is not saved in the command history.


set

The set command enables you to specify parameter values or to display parameter values. Parameters whose values are specified with the set command are global to the current session. Global commands are available to all commands during that session. If you execute set with no arguments , the value of all parameters defined during the current session are displayed. If you execute set with a parameter that is specified as an argument, the value of that parameter is displayed. The following example shows all three variations of this command.


> set height=10
> set
height=10
> set height
height=10
status

The status command displays the status of any commands that are running in the background.

unalias

The unalias command removes the alias that was specified as an argument.

unset

The unset command removes the specified parameters from the current session.


Note –

The unset command is not saved in the command history.