serviced service
The serviced service command lets you manage an application's individual services.
Use this command to perform administrative actions on a specific service or view service status information.
COMMANDS
The following commands are available for serviced service:- list
- List all services.
- status
- Display the status of deployed services.
- add
- Add a service.
- clear-emergency
- Reset the emergency-shutdown flag for a service that was shut down due to a low-storage condition.
- clone
- Clone a service.
- remove, rm
- Remove a service.
- edit
- Edit a service in a text editor.
- assign-ip
- Assign an IP address to service endpoints that require an explicit IP address.
- start
- Start one or more services.
- restart
- Restart one or more services.
- stop
- Stop one or more services.
- shell
- Start a service instance.
- run
- Run a service command in a service instance.
- attach
- Run an arbitrary command in a running service container.
- action
- Run a predefined action in a running service container.
- logs
- Display the log contents for a running service container by calling docker logs.
- list-snapshots
- List all snapshots of a service.
- snapshot
- Take a snapshot of a service.
- endpoints
- List the endpoints that are defined for a service.
- public-endpoints
- Manage public endpoints for a service.
- help, h
- Show a list of commands or the help for a single command.
serviced service [start | stop]
By default, Control Center schedules services in the background to start, and stop. The asynchronous scheduling improves the speed of these operations, especially in large-scale installations. However, if you use a script that depends on synchronous scheduling that was used in earlier versions of Control Center, specify the command line option --sync.
Syntax:
serviced service [start | stop] [-s|--sync] ServiceID
- --sync, -s
- Schedules services synchronously. Specify this flag if a script expects the serviced service [start | stop] command to wait to return until the service operation has been scheduled. If this flag is not specified, services are scheduled asynchronously, in the background.
serviced service restart
By default, Control Center schedules services in the background to restart to improve the speed of the operation, especially in large-scale installations. However, if you use a script that depends on synchronous scheduling that was used in earlier versions of Control Center, specify the command line option --sync.
Syntax:
serviced service restart [commandOptions] \ {ServiceID | instanceID}
- --auto-launch
- Recursively schedules child services.
- --sync, -s
- Schedules services synchronously. Specify this flag if a script expects the serviced service restart command to wait to return until the service operation has been scheduled. If this flag is not specified, services are scheduled asynchronously, in the background.
- --rebalance
- Stops all instances of a service before restarting, instead of performing a serial restart of multi-instance services.