Managing NerveCenter - Controlling NerveCenter from the Command Line - NerveCenter Command Line Interface - Entering Multiple Commands in an Interactive Session -
Previous: Entering a Single Command in a UNIX Shell or a DOS Prompt     Next: Running a script that contains one or more commands

Entering Multiple Commands in an Interactive Session

 
  To open an interactive session and enter multiple commands, follow these steps:

  1. Open a UNIX shell or a DOS Command Prompt window.
  2. Do one of the following:

    To open an interactive session without connecting directly to a server, type nccmd and press Return.

    The nccmd command prompt is displayed:

    nc>

    To open an interactive session and connect directly to a server, type

    nccmd -s ServerName -u UserName -p Password -n Port

    where ServerName is the name of the NerveCenter server you want to contact, UserName and Password are a valid user name and password for that NerveCenter server, and Port is the server's command-line-interface port (32506 by default). Then press Return.

    The nccmd command prompt is displayed and you are connected to the server you specified:

    nc>

    All subsequent commands are sent to that server until you connect to an additional server or issue a select server command.

  3. Type the commands you want to run, pressing Return after each one.

    The syntax for the commands is specified in Command line interface reference.

    Each time you press Return, you are returned to the nccmd command prompt. If any command returns an error, nccmd quits, returns you to the shell prompt or the Command Prompt, and displays the error.

  4. To exit the interactive session, type quit at the prompt and press Return.

    You are returned to a shell prompt or a Command Prompt.

In the following example, a user named Kim opens an interactive session, connects directly to the server, deletes a node, disconnects from the server, and quits the session. For this example, the server is named sales, Kim's user ID is kimz, her password is NoMuZak, and the name of the node she is deleting is N0128.


   C:\>nccmd -s sales -u kimz -p NoMuZak -n 32506
   nc>delete node -n N0128
   nc>disconnect
   nc>quit


Previous: Entering a Single Command in a UNIX Shell or a DOS Prompt Next: Running a script that contains one or more commands
Please send comments or corrections to Information Development
This file was last updated on 14 November © 2002