emsca

The emsca utility enables you to manage Services through system commands, such as shutting down the environment, starting, ignoring and viewing Service statuses. It is a watchdog process for Services, which is monitored by the Control-M/EM Configuration Agent, as described in Control-M Services. Although you can use the services-cli utility for some commands, this utility enables you to run system-wide commands that are not dependent on Kafka or any other Service. The emsca utility supports operation commands that are only available on the host where the command is sent.

Running the emsca Utility

This procedure describes how to run the emsca utility, which enables you to manage Services through system commands, such as shutting down the environment, starting, ignoring and viewing Service statuses, and determining the log level. It is a watchdog process for all Services, which is monitored by the Control-M/EM Configuration Agent, and is not dependent on Kafka or any other Service.

Begin

  1. Do one of the following:

    • UNIX: Log in to a Control-M/EM account.

    • Windows: Open a command prompt where Control-M/EM is installed.

  2. Run the following command:

    • UNIX: em emsca <Command>

    • Windows: emsca <Command>

      where <Command> is any of the commands in emsca Commands.

    The emsca utility runs.

emsca Commands

The following table describes the emsca commands when running the emsca utility:

Command

Description

help [<COMMAND>]

Returns an explanation of one or all of the following emsca utility commands (COMMAND):

  • set-desired-state

  • get-desired-state

  • get-current-state

  • shutdown

  • status

  • services-details

  • service

set-desired-state [--all] [-s=<Service_Name>] <Desired_State>

Determines the desired state of one or all local host Services, as follows:

  • (Optional) --all: Determines the desired state of all Services.

  • (Optional) -s=<Service_Name>: Determines the desired state of one of the following Services:

    • airsrv-web

    • apache-kafka: Apache Kafka.

    • apache-zookeeper: Apache Zookeeper.

    • controlm-web: Control-M Web.

    • ctms-app-updates-service

    • ctm-hybrid-communication-proxy: Control-M/Server Hybrid Communication Proxy.

    • ctms-job-info-service: Control-M/Server Job Information Service.

    • ctms-api-gateway-service: Control-M/Server API Gateway Service.

    • ctmCE: CE Process.

    • ctms-order-service: Control-M/Server Run (Order) Service.

    • elasticsearch: Elasticsearch

    • em-mft-updates-service: Control-M/EM MFT Updates Service.

    • kibana: Kibana

    • periodic-backup-service: Periodic Backup Service

    • protocol-translator: Protocol Translator.

    • scheduling-service: Scheduling Service.

    • reporting-facility: Reporting Facility.

    • services-configuration-agent: Services Configuration Agent.

    • services-health-monitor: Services Health Monitor.

    • validation-service: Validation Service.

    • workflow-insights-serviceWorkflow Insights

    • opensearch: OpenSearch, as described in Control-M Workflow Insights Installation.

    • opensearch-dashboardsWorkflow Insights Dashboards

    The following command lists the desired and actual states of all available Services in your environment:

    emmsi directcli -st

  • Desired_State:
    • up

    • down

    • ignored

The state is updated in the *.yml file in the <EM_HOME>/services/desired_state/ directory

get-desired-state -s=<Service_Name>

Returns the desired state of one of the following Services (Service_Name):

  • airsrv-web

  • apache-kafka: Apache Kafka.

  • apache-zookeeper: Apache Zookeeper.

  • controlm-web: Control-M Web.

  • ctms-app-updates-service

  • ctm-hybrid-communication-proxy: Control-M/Server Hybrid Communication Proxy.

  • ctms-job-info-service: Control-M/Server Job Information Service.

  • ctms-api-gateway-service: Control-M/Server API Gateway Service.

  • ctmCE: CE Process.

  • ctms-order-service: Control-M/Server Run (Order) Service.

  • elasticsearch: Elasticsearch

  • em-mft-updates-service: Control-M/EM MFT Updates Service.

  • kibana: Kibana

  • periodic-backup-service: Periodic Backup Service

  • protocol-translator: Protocol Translator.

  • scheduling-service: Scheduling Service.

  • reporting-facility: Reporting Facility.

  • services-configuration-agent: Services Configuration Agent.

  • services-health-monitor: Services Health Monitor.

  • validation-service: Validation Service.

  • workflow-insights-serviceWorkflow Insights

  • opensearch: OpenSearch, as described in Control-M Workflow Insights Installation.

  • opensearch-dashboardsWorkflow Insights Dashboards

The following command lists the desired and actual states of all available Services in your environment:

emmsi directcli -st

get-current-state -s=<Service_Name>

Returns the desired state of one of the following Services (Service_Name):

  • airsrv-web

  • apache-kafka: Apache Kafka.

  • apache-zookeeper: Apache Zookeeper.

  • controlm-web: Control-M Web.

  • ctms-app-updates-service

  • ctm-hybrid-communication-proxy: Control-M/Server Hybrid Communication Proxy.

  • ctms-job-info-service: Control-M/Server Job Information Service.

  • ctms-api-gateway-service: Control-M/Server API Gateway Service.

  • ctmCE: CE Process.

  • ctms-order-service: Control-M/Server Run (Order) Service.

  • elasticsearch: Elasticsearch

  • em-mft-updates-service: Control-M/EM MFT Updates Service.

  • kibana: Kibana

  • periodic-backup-service: Periodic Backup Service

  • protocol-translator: Protocol Translator.

  • scheduling-service: Scheduling Service.

  • reporting-facility: Reporting Facility.

  • services-configuration-agent: Services Configuration Agent.

  • services-health-monitor: Services Health Monitor.

  • validation-service: Validation Service.

  • workflow-insights-serviceWorkflow Insights

  • opensearch: OpenSearch, as described in Control-M Workflow Insights Installation.

  • opensearch-dashboardsWorkflow Insights Dashboards

The following command lists the desired and actual states of all available Services in your environment:

emmsi directcli -st

shutdown [-f]

Shuts down all Services, including the Services Configuration Agent through the following commands:

  • UNIX: ‘kill -15 <PID>’

  • Windows: ‘wmic process <PID> delete’

To kill all remaining processes and force shutdown, run the following command:

UNIX: ‘kill -9 <PID>’

status [-x]

Returns one of the following Service states on the current host:

  • rc=0: The current and desired states of all Services match.

  • rc=1: All Services are currently down.

  • rc=2: The current state of at least one Service does not match its desired state.

  • rc=-1: General error.

(Optional) -x excludes all Services set to the desired state Ignore.

services-details

Returns basic information, in JSON format, about the Services that run on the host, such as the process ID (PID), timestamp, and state.

service

Starts the Services Configuration Agent in service mode.

The following examples describe the emsca utility on UNIX:

  • To see the help, type the following:

    em emsca help

  • To set the desired-state of the Protocol Translator to Ignored, run the following command:

    em emsca set-desired-state ignored –s protocol-translator

  • To set all Services desired state to ‘down’ type the following:

    em emsca set-desired-state down --all

The following examples describe the emsca utility on Windows:

  • To shut down all Services run the following command:

    emsca shutdown –f

  • To send the status command, type the following:

    emsca status

  • To run the Services Configuration Agent in Service mode, run the following command:

    emsca service