ControlTier Inc. > CTL
 
Font size:      

CTL Command Reference

Synopsis

                ctl [-h] [-v] [-V] [-l level] [-z]
                [-T port [-R inputServerHost] [-N identifier] ]
                [-threadcount<1>] [-K] [-I filter] [-X filter] [--filter-exclude-precedence true/false]
                [-p project] [-t type -o object | -m module ] -c command
                [-- command-options]
            

Overview

The CTL command is used to invoke defined Commands in either Module or Object context, which can be executed locally or dispatched to remote nodes. The set of available Modules, Objects, and Commands will vary depending on the Modules which are deployed to the target node, and what Commands are defined in the Module.

ctl invocations are composed of five sections:

                ctl [general options] [node dispatch options] <context> <command> [command options]
            

General Options

Option alternate argument description
-h false displays the usage information presented above
-v false run verbose
-V false run verbose and with loglevel debug
-l --level true log level. Must be one of: debug|verbose|info|warning|error. [info]
-z --terse false leave log messages unadorned.

Specifying -V is a shortcut for specifying -v -l debug.

Node Dispatch Options

Option alternate argument description
-C --threadcount true number of threads
-K false keep going when an error occurs on multiple dispatch
-I --nodes true include node parameter list
-X --xnodes true exclude node parameter list
--filter-exclude-precedence true set the exclusion filter to have precedence or not. (true/false)

Specifying either or both of -I and -X invokes Node Dispatching.

See Concepts > Node Dispatch, and Node Filtering Options for more information.

Context

All Context options expect an argument, and do not have a long-form alternate.

Option description required
-p project depot name TRUE, if more than one depot exists
-m module name. If specified, this puts command execution in a Module context. FALSE if both -t and -o are specified
-t entity type name FALSE if -m is specified
-o entity object name FALSE if -m is specified
-c command name. TRUE

Command execution occurs in either a Module Context, or an Object Context. When -m is specified, then it is invoked in Module Context. Otherwise if both -t and -o are specified, then it is invoked in Object Context.

To specify a Valid Context, the arguments must contain -m or both -t and-o.

The project name argument -p is optional only when there is a single project. Otherwise it is required.

A Command can only execute with a valid context.

Execution

The CTL command executes in two modes, depending on whether required arguments are specified or not: Command Mode, and Listing Mode.

Command Mode

Command mode occurs when all of the required Context arguments are specified and a valid Context is specified. In this mode, the Module specified by either -m or -t is used to look up the command named with -c. This command is executed with the arguments specified after the -- on the command line.

Examples:

ctl -p MyProject -m AModule -c someCommand

This executes the command "someCommand" for module "AModule" in the project "MyProject".

ctl -m AModule -c someCommand

If there is only one project, then the -p option can be left off.

ctl -p MyProject -t AppService -o dev1 -c runTest -- -test basic -quiet

This executes the "runTest" command for an object, and specifies a few command options.

Command Options

Options for the invoked are specified after the -- on the command-line. The names and kinds of options depend on the implementation of the specific defined command that is being invoked, but have certain requirements:

Command Options are specified using the hyphen character (-) in front of the name of the option. For those options which accept a string argument, it must follow the option name.

E.g:

-- -name MyName
                    

Boolean options do not need an argument, and their presence on the command line constitutes the value true, while their absence constitutes false:

-- -aBooleanOption
                    

String options may have default values, which will be used when the option is not specified.

To specify a string argument that contains the space character " ", the argument must be quoted for your particular shell:

-- -option1 "a string"
                    

In general, executing the command without specifying a required option will cause the command to fail and output a message indicating the set of required options.

Command Output

Note
The output of the command will depend on its purpose and implementation, and will usually have each line prefixed with the Context information. This prefixing can be turned off by invoking the -z/--terse flag.

Listing Mode

CTL will enter Listing Mode when the arguments specified on the command line do not constitute a valid Context, including when no options are specified.

Depending on how many contextual arguments are available, CTL will print out a list of available items for forming a valid Context:

Context Listing Output
None Full list of available Projects, with their available Modules, Commands and Objects.
-p Project Context Available Modules, Commands and Objects.
[-p] -m Module Context Detailed listing of available Commands for the Module, with descriptions and command-line arguments.
[-p] -t Type Context List of Objects available for the Type.
[-p] -t -o Object Context Detailed listing of available Commands for the Object, with descriptions and command-line arguments.

Thus you can easily see what context components you can use by repeatedly executing ctl and adding new context arguments each time.

Running ctl with no options specified will give you the broadest overview of the available contexts and commands that can be run.

Other Options

Option alternate argument description
-T --port true input server port
-R --host true input server remote hostname
-N --name true identifier for remote input server
Note
The arguments for the input server (-T/--port,-R/--host, and -N/--name) are unneeded by end-users. They are used by CTL when remotely executing commands.