Sun Management Center 3.6.1 User's Guide

CLI Procedures

This section describes some common CLI procedures.

ProcedureTo Access the CLI in the Solaris or Linux Operating Environment

Before You Begin

Note –

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:


  1. To begin an interactive session, type the command /opt/SUNWsymon/sbin/es-cli followed by any desired global parameters.

  2. Type login in response to the CLI prompt (>).

  3. Type the name of the host to which you wish to connect in response to the Host prompt.

  4. 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.
    >

    Tip –

    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.


ProcedureTo Access the CLI in Microsoft Windows Environments

  1. After you have installed the Sun Management Center console layer, double-click es-cli in the CLI folder.

    The CLI screen is displayed.

  2. 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:
    >

ProcedureTo Access CLI Online Help

  1. To obtain a list of all available CLI commands, type help at the CLI prompt.

  2. 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
    

ProcedureTo Control Command Output Screen Size

  1. 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
    
  2. To enable output to be viewed one page at a time, set the more parameter to on.


    > set more=on
    

ProcedureTo Record CLI Commands in a Log File

  1. 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.

  2. To stop recording, use the unset command with the log parameter.


    > unset log
    

ProcedureTo Record Command Output in a File

    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
    

ProcedureTo Terminate a CLI Session

    To terminate a CLI session, type exit.


    > exit