connect - Connects to SpectroSERVER

The connect command connects the user of the sp Command Line Interface to the ss running on host system, hostname. This command also sets the landscape that is specified by landscape_handle to be the current landscape. If the CLI Local Server is not already running, the connect command starts it.
casp941
The
connect
command connects the user of the
CA Spectrum
Command Line Interface to the
SpectroSERVER
running on host system,
hostname.
This command
also sets the landscape that is specified by landscape_handle to be the current landscape. If the CLI Local Server is not already running, the connect command starts it.
The command has the following format:
connect [<hostname>] [lh=<landscape_handle>][vnmsocket=<vnmsocket>]
  • hostname
    (Optional) If hostname is not specified, the command connects the user to the host specified in the CLI resource file .vnmshrc.
    CA Spectrum
    Command Line Interface does not support localhost or the 127.0.0.1 option. To connect to localhost, you can specify the actual hostname or do not specify any parameter.
  • landscape_handle
    (Optional) If landscape_handle is not specified, the command sets the current landscape to the landscape of the host name specified.
  • vnmsocket
    (Optional) If vnmsocket is not specified, the command connects to the
    SpectroSERVER
    using the socket specified in the .vnmshrc file. You can use vnmsocket to connect to another
    SpectroSERVER
    on a different port connection that is defined by vnmsocket.
On Unix, error messages that are reported by the CLI Local Server are displayed in the console window. On Windows, these errors are displayed in the user bash shell window.
Example: connect
#! /usr/bin/sh # A sample script to get alarms of a specific # severity and set the CLISESSID if [$# !=1] then echo "Usage: $0 <alarm severity>" exit 0 fi CLISESSID=$$ $SPECROOT/vnmsh/connect $SPECROOT/vnmsh/show alarms | grep -i $1 $SPECROOT/vnmsh/disconnect exit 0
If the command is successful, the following message is displayed:
connect: successful hostname current landscape is <landscape_handle>
Hostname is the user-entered
SpectroSERVER
host or the host that is specified in the .vnmshrc file. landscape_handle is the user-entered landscape or the landscape for the host.