This section describes some common CLI procedures.
If the console is not installed in the default /opt directory, the CLI application will not start. In this case, start the CLI application by either of the following ways:
After installation, change the location of the add-ons in the cli.properties file to correctly point to the installed location.
Create the /opt/SUNWsymon/cli/addons directory.
To begin an interactive session, type the command /opt/SUNWsymon/sbin/es-cli followed by any desired global parameters.
Type login in response to the CLI prompt (>).
Type the name of the host to which you wish to connect in response to the Host prompt.
Type your login name and password in response to the Login and Password prompts.
The result of steps 1-4 resembles the following example:
/opt/SUNWsymon/sbin/es-cli parameters > login Host: myhost Login: mylogin Password: mypassword Login is successful. > |
You can run the CLI in batch mode using a previously prepared file of CLI commands as input by using the following command: /opt/SUNWsymon/sbin/es-cli -b file.
After you have installed the Sun Management Center console layer, double-click es-cli in the CLI folder.
The CLI screen is displayed.
Type the login command.
The login process prompts you to specify the desired host name and your login name.
In the following example, seattle is the host, and susan is the login name:
> login Host: seattle Login: susan Password: > |
To obtain a list of all available CLI commands, type help at the CLI prompt.
To obtain a more detailed explanation of a particular command, type help followed by the name of the command.
For example, to obtain additional help about the getLoadedModules command, you would type:
> help getLoadedModules |
Define a screen size by setting the height parameter to the number of lines to display.
For example, to define a screen 20 lines high, you would type:
> set height=20 |
To enable output to be viewed one page at a time, set the more parameter to on.
> set more=on |
Set the log parameter to the name of the file in which to record the commands.
> set log=/home/examples/log.3c254030 |
Once the log parameter is set, all subsequent commands are appended to the file. If this file does not exist, the file is created.
The file is not overwritten, so make sure a new file is created if you want a new set of records.
To stop recording, use the unset command with the log parameter.
> unset log |
To record command output in a file, set the o parameter to the name of the output file.
> set o=/home/examples/output.3c254030 |
To stop recording, use the unset command with the o parameter.
> unset o |
To terminate a CLI session, type exit.
> exit |