How to stop or start Micro Services in Control-M/Server using the ctmsca utility? |
Control-M/Server version 9.0.20 Micro Services can be checked on as well as stopped and restarted using the ctmsca utility. The ctmsca utility offers several command-line options that show micro services statuses, sets statuses, shuts the microservices down, and restart them as needed. ==================== Usage: [COMMAND] Commands: help Displays help information about the specified command set-desired-state Set a service or services desired state get-desired-state Get a service's desired state get-current-state Get the current state of a service shutdown Shutdown all services including services-config-agent (watch-dog) status Display services status service Starts the services-configuration-agent application in a service mode
Run 'help COMMAND' for more information on a command. You can check on the microservices statuses by running the command below: ctmsca status You can check the current state of a microservice using the command below: ctmsca get-current-state -s <micro service name*> Examples for Apache-Kafka and Apacha-Zookeeper are below: ctmsca get-current-state -s apache-kafka ctmsca get-current-state -s apache-zookeeper You can check the desired state of a microservice using the command below: ctmsca get-desired-state -s <micro service name> You can set the desired state of a microservice using the set-desired-state option below: Usage: set-desired-state [-x] [--all] [-s=<serviceName>] desired-state Set a service or services desired state desired-state Supported desired states are : up, down and ignored --all Run command for all services -s, --service=<serviceName> The service name targeted by command -x, --exclude_ignored When used with '--all' doesn't change desired state if current desired state is 'ignored' Below is an example of setting Apache-Kafka to a desired state of up: ctmsca set-desired-state -s=apache-kafka up Successfully set service apache-kafka to desired state up You can stop all microservices using the shutdown command below: ctmsca shutdown or ctmsca shutdown -f You can start all microservices using the service command below: ctmsca service |