To execute CNC requests, a command line utility is provided with the e-Biz Impact server binaries. To execute the utility, you must set the following options in either a configuration file or pass the options as command line arguments.
To run these command use the ims wrapper
scripts, see “Adding the wrapper scripts directory to the PATH variable”.
ims cnc -cluster.name cluster_name
-cluster.server server_name
-domain.type domain_type
-domain.name domain_name
-file file_name
-cnc.user user_name
-cnc.password password
-cnc.subject subject
-cnc.type {mgr | ctlr | sfm}
-cnc.object object
-cnc.command command
-cnc.argn
-env.snmp.port snmp_port
The following parameters are required in a CNC request:
-usr user_name – the user name of the person invoking the command. If you are using e-Biz Impact security, this user must have a role assigned that authorizes them to use this command. See the e-Biz Impact Authorization Guide for more information.
-pwd password – required. The password for the user name that was entered.
-sub subject – the subject executing the action.
-type {mgr | ctlr | sfm} – the type of object for which the command is being issued—the cluster (mgr), the controller (ctlr), or the SFM (sfm).
-obj object – the object for which the request is being issued.
-cmd command – the command being issued.
These arguments are optional in a CNC request:
-mgr cluster_name – name of the cluster for which the command is being executed.
-server server_name – the name of the machine on which the cluster is running. The default is “localhost” if not specified.
-type domain_type – the cluster’s domain type. The default is “Impact” if not specified.
-name domain_name – the cluster’s domain name. The default is “Impact” if not specified.
-file file_name – the name of a configuration file that contains all or some command line arguments. Commands issued at the command line take precedence over the same commands in this file.
-snmp.port snmp_port – optional. The SNMP port only if the cluster publishes telemetry on a custom port. When using custom SNMP ports, you must specify this argument. If you do not specify this argument, the CNC command fails. See Monitoring e-Biz Impact for more information about using SNMP.
-args n – an optional list of string arguments to the CNC function. For example:
-cnc.args arg1, arg2, arg3
When arguments are provided on the command line, the argument values must be the last arguments on the command line.
The cluster.name, domain.type and domain.name arguments
allow e-Biz Impact to identify the cluster external port using SNMP.
When the CNC utility is executed, the cnc.xlog log file is created. The log file contains debug, success, and error messages that occur during execution.
The return values are:
0 – the command is executed successfully. However, this does not mean that the command itself works, just that the command has executed properly. Check the actual command return value to verify that the command not only executed, but also did what it was supposed to do.
For example, if getTransactionData is issued
with a serial number that does not exist, the command itself could
be executed properly, and the return value would be 0
. However, since
the serial number is invalid, the command itself would return -900
.
1 – the command failed to execute due to a CNC error.
2 – the command failed to execute due to an invalid configuration; for example, bad or missing arguments.
3 – the command failed to execute due to an SNMP error.
4 – the command failed to execute due to a failed connection to the e-Biz Impact server.
5 – the command failed to execute due to a failed login to the e-Biz Impact server.
100 – the command failed to execute due to an unknown error.
This example of a CNC request entered at the command line disables a cluster. The command would be entered on one line:
ims cnc -mgr cluster1 -type mgr -sub cluster1
-obj cluster1 -cmd disable -usr system
-pwd manager
This CNC example enables a controller:
ims cnc -mgr cluster1 -type ctlr -sub controller1
-obj controller1 -cmd enable -usr system
-pwd manager
The -type and -sub arguments
must match. To enable or disable applications other than SFMs, use
the application name for the subject.
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |