emsca
The emsca utility enables you to monitor services through system commands, such as shutting down the environment, starting and ignoring services, and viewing the status of all services. It is a watchdog process for services, which is monitored by the Control-M/EM Configuration Agent. Although you can use the services-cli utility for some commands, use this utility if you want to include system wide commands that are not dependent on Kafka or any other service. This utility supports operation commands that are only available on the current machine where the command is sent.
Running the emsca Utility
This procedure describes how to run the emsca utility, which enables to monitor and send commands for all services such as shutting down, starting and ignoring services, viewing the status and setting the log level, etc. It is a watchdog process for all services, which is monitored by the Control-M/EM Configuration Agent, but is not dependant 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 window where Control-M/EM is installed.
-
-
Type one of the following commands:
-
UNIX:em emsca <command>
-
Windows:emsca <command>
-
emsca Commands
The following table describes the emsca commands when running the emsca utility:
Command |
Description |
Usage |
---|---|---|
help |
Displays SCA available commands |
emsca help <COMMAND> |
set-desired-state |
Sets the desired state for the service or all services on local machine. The desired state is updated in the yml file located in <EM_HOME>/services/desired_state/ |
emsca set-desired-state [--all] [-s=<serviceName>] <desired-state>
|
service |
Starts the Services Configuration Agent in a service mode |
emsca service |
status |
Returns the services state on current machine. Retrieved values:
|
emsca status |
shutdown |
Shutdown all services including services-config-Agent (watch-dog) by running the following:
To force shutdown by killing all remaining processes: UNIX: ‘kill -9 <PID>’ |
emsca shutdown [-f] |
emsca Examples
The following examples describe the emsca utility in the UNIX environment:
-
To see the help, type the following:
em emsca help
-
To set set the protocol-translator's desired-state to ignored, type the following:
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 in the Windows environment:
-
To force shutdown of all services, type the following:
emsca shutdown –f
-
To send the status command, type the following:
emsca status
-
To run the Services Configuration Agent in service mode, type the following
emsca service