ServiceManager - Command Line Program (CLI)

The command line program (UCYBSMCL) allows you to manage your services via batch processing. It is available for Windows and UNIX.

This page includes the following:

Overview

You can start and end services, as well as call up a list services of a computer in a ServiceManager environment.

Note: The CLI Program is case-sensitive.

All services that belong to the ServiceManager's environment can be protected with a password, thus protecting the services from being started, ended, or modified without authorization.

There are three different authorization levels:

  1. Read

    Allows you to monitor the status of the services.

  2. Read and execute

    Allows you to execute commands, such as start and stop services, and monitor the status of the services.

  3. Read, execute, and administrate

    Allows you to edit the configuration of the ServiceManager, to execute commands, and to monitor the status of the services.

Important! You require the authorization level Read, execute, and administrate to set or change passwords. For more information, see Handling Components.

You can establish a secure connection (TLS 1.2) with the ServiceManager but still support non secure connections to legacy ServiceManagers. For secure connections, you need to have CAPKI installed on the same computer in which you have installed the ServiceManager CLI. If you are using an insecure connection, the CLI executes the command towards the ServiceManager but also writes a warning message to Standard error.

If the Client Certification is enabled in the ServiceManager, the client requires a certificate for authentication. The certificate and key files for the ServiceManager - CLI have to be provided as additional command line parameters.

For more information, see CAPKI - Securing the ServiceManager.

Example

In this example, the certificate and key files are located in the .\bin directory of the ServiceManager - CLI.

ucybsmcl -c GET_PROCESS_LIST -h unixw2k01:8871 -n uc4p -certificate C:\Automic\Automation.Platform\ ServiceManagerDialog\bin\<certificatefilename>.pem -key C:\Automic\Automation.Platform\ ServiceManagerDialog\bin\<keyfilename>.pem

Some certificates may require an intermediate certificate for validation if the signing certificate authority is not trusted directly. Use the command line parameter -chain <chain file name> to point to the location of the intermediate certificate.

If the client certification is enabled and the client does not have a certificate or if the certificate validation fails, the connection is terminated. In this case, the ServiceManager writes a corresponding log entry and returns an error message to the client.

Syntax

Windows:

UCYBSMCL [.EXE] -c GET_PROCESS_LIST -h computer name -n phrase

UCYBSMCL [.EXE] -c START_PROCESS -h computer name -n phrase -s name of the service [-p password]

UCYBSMCL [.EXE] -c STOP_PROCESS -h computer name -n phrase -s name of the service [-m stop mode] [-p password]

UCYBSMCL [.EXE] -c SET_DATA -h computer name -n phrase -s name of the service -d property value [-p password]

Unix:

ucybsmcl  -c GET_PROCESS_LIST -h computer name:port number -n phrase

ucybsmcl  -c START_PROCESS -h computer name:port number -n phrase -s name of the service [-p password]

ucybsmcl  -c STOP_PROCESS -h computer name:port number -n phrase -s name of the service [-m stop mode] [-p password]

ucybsmcl  -c SET_DATA -h computer name:port number -n phrase -s name of the service -d property value [-p password]

Parameters

When you call the command line program using incorrect or missing parameters, a short help text will be displayed that shows correct parameters and return codes.

Output

When you call the command line program with the GET_PROCESS_LIST command, the requested information will be displayed line by line. It corresponds to the view of the ServiceManager Dialog program.

Output format

"Service" "Status" ["ProcID" "Start time" "Runtime" "CPU Time"]

Return Codes

Examples

The first example retrieves all services that belong to the computer WINW2K01 and the ServiceManager environment UC4P.

UCYBSMCL.EXE -c GET_PROCESS_LIST -h WINW2K01 -n UC4P

Output:

"UC4 CP1" "R" "1588" "2004-04-05 21:39" "0/01:11" "0/00:00:22.69"
"UC4 WP1" "R" "3388" "2004-04-05 21:39" "0/01:11" "0/00:00:22.69"
"UC4 WP2" "R" "1576" "2004-04-05 21:39" "0/01:11" "0/00:00:22.69"
"Win32-Agent WIN01" "R" "2708" "2004-04-05 21:40" "0/01:11" "0/00:00:01.31"
"Win32-Agent WIN21" "R" "2392" "2004-04-05 21:40" "0/01:10" "0/00:00:01.30"
"Win32-Agent UC4MAIL" "R" "2932" "2004-04-05 21:40" "0/01:10" "0/00:00:01.31"
"SAP Agent C46" "S"
"PeopleSoft-Agent PS01" "S"

The second example terminates a UNIX agent normally.

./ucybsmcl -c STOP_PROCESS -h unixw2k01:8871 -n uc4p -s unix01 -m Close

See also: