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
-
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.
-
-
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 [--all] [-s=<Service_Name>] <Desired_State> |
Determines the desired state of one or all local host Services, as follows:
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):
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):
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:
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:
(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