Start and stop service class instances¶
This page explains how to start, stop, and restart individual service class instances and processes using kxsctl.
You use the command line interface kxsctl to start and stop service class instances/processes. You can run this CLI from any node on your system.
Start a service class instance¶
Starts processes/service class instances. Affected processes/service classes can be specified via an argument or parameters.
| Syntax | kxsctl start [targets] [flags] |
|---|---|
| Flag | Description |
|---|---|
-c |
(console) Start in interactive console. |
-d |
(debug)* Load debugging utilities. |
--port |
Set the desired port. |
-o |
(observe)* Keep protected execution enabled. |
-p |
(process) Specify process(es). |
-s |
(service class) Specify service class(es). |
* Only available when in interactive console.
A target that isn't in the manifest is rejected. The --threads, --taskset, --tls-mode and --auth overrides apply to every target you name.
Stop a service class instance¶
Stops a process/service class instance.
| Syntax | kxsctl stop [targets] [flags] |
|---|---|
| Flag | Description |
|---|---|
-f |
(force) Forces process termination if graceful attempts fail. Applies to services only. |
-p |
Specified process(es). |
-s |
Specified service class(es). |
A process that is running but disabled can be stopped. kxsctl stop waits for both deregistration from Discovery and process exit before it reports completion, and exits non-zero if a target never stops or the operation times out.
Restart a service class instance¶
Stops and then restarts a process/service class instance.
| Syntax | kxsctl restart [flags] |
|---|---|
| Flag | Description |
|---|---|
-c |
(console) Start in interactive console. |
-d |
(debug)* Load debugging utilities. |
-f |
(force) Forcibly stop process(es). |
--port |
Set the desired port. |
-o |
(observe)* Keep protected execution enabled. |
-p |
(process) Specify process(es). |
-s |
(service class) Specify service class(es). |
* Only available when in interactive console.
kxsctl restart warns you which targets it stops but doesn't start again, for example a disabled process.