You can use the supervisorctl command to start, stop, and restart services of OceanBase Migration Service (OMS) and view their status.
Syntax
supervisorctl <start | stop | restart | status > <oms_console | oms_drc_cm | oms_drc_supervisor >
| Parameter | Description |
|---|---|
start |
Specifies to start the service. |
stop |
Specifies to stop the service. |
restart |
Specifies to restart the service. |
status |
The service status. |
oms_console |
The OMS console. |
oms_drc_cm |
The Cluster Manager (CM) service. |
oms_drc_supervisor |
The supervisor service. |
Prerequisites
You have logged on to the OMS container on the server where OMS is deployed. Run the following command to go to the container where OMS is deployed:
docker exec -it <oms_container_name> bash
After you log on to the OMS container, you can run the supervisorctl command.
Start an OMS service
Run the following command to start an OMS service such as the OMS console:
supervisorctl start oms_console
If the OMS console is started, the following output is returned:
oms_console: started
Stop an OMS service
Run the following command to stop an OMS service such as the OMS console:
supervisorctl stop oms_console
If the OMS console is stopped, the following output is returned:
oms_console: stopped
Restart an OMS service
Run the following command to restart an OMS service such as the OMS console:
supervisorctl restart oms_console
If the OMS console is restarted, the following output is returned:
oms_console: stopped
oms_console: started
View the status of an OMS service
Run the following command to view the status of an OMS service such as the OMS console:
supervisorctl status oms_console
The following output is returned:
oms_console RUNNING pid 50884, uptime 0:02:45
Note
You can also run the supervisorctl status command to view the status of all OMS services.
The following table describes all the service states.
| State | Description |
|---|---|
STARTING |
The service is being started. If the service stays in the STARTING state for a long time, view the CM logs to check the database connectivity. |
RUNNING |
The service is running. |
STOPPED |
The service is stopped. |