service
The egosh service sub-command manages services in your cluster.
service add -f service_xml
Creates a new service from the service definition XML.This is an administrative subcommand. You must log on as cluster administrator to issue this subcommand.
- -f service_xml
- Specifies the path to the service definition file, that adheres to the sc.xsd schema.
service config -s service_name -M maximum_instances [-i si_seq_no,...] [-f] [-m minimum_instances] service config -s service_name -m minimum_instances [-M maximum_instances [-i si_seq_no,...] [-f]]
This is an administrative subcommand. You must log on as cluster administrator to issue this subcommand.
This command can only be issued when the service is in the DEFINED, STARTED or ALLOCATING state.
- -s service_name
- Specifies the service to which this action applies.
- -m minimum_instances
- Specifies the minimum number or percentage of service instances that must be running for the service to be considered started. The value specified here is updated in the service profile's MinInstances parameter.
- -M max_instances
- Specifies the maximum number of service instances that can run simultaneously for the service.
The value specified here is updated in the service profile's MaxInstances parameter.
When the maximum number of service instances is less than the previous value, and not enough service instances were specified to reduce MaxInstances, EGO will choose to kill the most recently started service instance.
- -i si_seq_no,...
- Lists the sequence numbers of service instances that are to be terminated and released, so that
the maximum number of service instances stays at the value specified.
If service instances are to be terminated to meet the new maximum, the EGO service controller considers all service instances in the START, ERROR, and FINISH states along with the specified list of service instances (identified by the sequence number). If the service controller determines that the required number of service instances can be freed from among those in the START, ERROR, and FINISH states, and those in the specified list, it will arbitrarily select and terminate service instances to satisfy the new maximum.
If the service controller needs to terminate more service instances to meet the new maximum, specify more service instances and rerun the command. If you have specified enough service instances but the instances do not free up enough slots, you may need to reconfigure the MaxInstancesPerSlot parameter.
- -f
- Executes the command immediately without asking for confirmation, when the maximum number of service instances is less than the previous value and not enough service instances were specified to reduce MaxInstances.
service delete service_name ...
Removes a service from the service definition XML.This is an administrative subcommand. You must log on as cluster administrator to issue this subcommand.
- service_name ...
- Specifies the name of an existing service.
To specify multiple services, separate the service names with a space.
service instance restart -s service_name {seq_no ... | all}
Restarts one or more service instances. Only service instances in the START, RUN, and HOLD states can be restarted.When a service instance is restarted, the system chooses the best host to start the service instance on again; the system may or may not start the service instance on the same host as before.
This is an administrative subcommand. You must log on as cluster administrator to issue this subcommand.
- service_name
- Specifies the name of an existing service.
- seq_no ...
- Specifies the sequence number of the service instance to be restarted.
To specify multiple service instances, separate the sequence numbers with a space.
- all
- Restarts all service instances that belong to the specified service.
service instance stop -s service_name {seq_no ... | all}
Stops the service instance and prevents the instance from restarting on the allocated slot. Only service instances in the RUN state can be stopped.When a service instance in the RUN state is stopped, the service instance process is shut down, the service instance is placed in the HOLD state, and the slot is disabled to prevent new service instances from starting on the host. The corresponding slot while disabled is reserved.
This is an administrative subcommand. You must log on as cluster administrator to issue this subcommand.
- service_name
- Specifies the name of an existing service.
- seq_no ...
- Specifies the sequence number of the service instance to be stopped. The service instance must be in the RUN state.
To specify multiple service instances, separate the sequence numbers with a space.
- all
- Stops all service instances in the RUN state that belong to the specified service.
service list [-l] [-ll] [-MDS] [-g service_group_name,...] | [ [-s service_name] [-t service_type_name] [-a alloc_ID] [-p consumer_name] [-r resource_name] ]
Lists registered services or service groups defined in EGO service controller.
- -l
- Provides the same information with a longer name field, if information is truncated when -l is not specified.
- -ll
- Provides the same information as the -l option, and in comma-separated values (CSV) format.
- -MDS
- Lists services used for multidimensional scheduling. If this flag is not set, services used for slot-based scheduling are listed.
When -MDS is specified, output changes to show the number of units, instead of slots.
- -g service_group_name
- Specifies the service group name to which this action applies. Displays all the service information for the specified service groups
To specify multiple service groups, separate the service group names with a comma.
Note: If you do not have EGO_SERVICE_VIEW permission for some services, the output will only show the services that you have permission to view. - -s service_name
- Specifies the service to which this action applies.
To specify multiple services, separate the service names with a space.
- -t service_type_name
- Lists all of the services with the specified service type. The options are either
ASCor!ASC.For Windows systems, valid values are either
egosh service list -t !ASCoregosh service list -t ASC.For Linux® systems, valid values are eitheregosh service list -t \!ASCoregosh service list -t ASC.Note: Available only with IBM® Spectrum Conductor. - -a alloc_ID
- Lists all services that belong to the specified allocation.
- -p consumer_name
- Lists all the services for the specified consumer.
- -r resource_name
- Lists all the services that are using the specified resource.
service modify service_name -f service_xml
Applies modifications made to the service definition XML so that they take effect.egosh service stop service_name
egosh service modify service_name -f service_xml
egosh service start service_nameThis is an administrative subcommand. You must log on as cluster administrator to issue this subcommand.
- service_name
- Specifies the name of an existing service.
To specify multiple services, separate the service names with a space.
- -f service_xml
- Specifies the path to the service definition file, that adheres to the sc.xsd schema.
service start [-g service_group_name,...] | [service_name …] | -p consumer_name | all
Starts one or more registered services defined in EGO service controller. If this is a service that is configured to start automatically, enables the service to be started automatically.When you run the egosh service start command, you can see all of the Docker containers that belong to the service.
- -g service_group_name
- Starts all services in one or more specified service groups.
To specify multiple service groups, separate the service group names with a comma.
Note: This is an administrative subcommand. You must have EGO_SERVICE_CONTROL permission on all the services that you want to start, and EGO_SERVICEGROUP_VIEW permission. - service_name
- Starts one or more specified services.
- -p consumer_name
- Starts all the services for the specified consumer. You can specify a consumer name or you can specify the path for a leaf or non-leaf consumer. If you specify the path or the name for a non-leaf consumer, all registered services that belong to its descendents are started. If you specify the consumer path as "/", all registered services of the cluster are started.
- all
- Starts all registered services.
service stop [-g service_group_name,...] | [service_name …] | -p consumer_name | all
Stops registered services defined in EGO service controller.When you run the egosh service stop command, you can see all of the Docker containers that belong to the service.
- -g service_group_name
- Stops all services in one of more specified service groups.
To specify multiple service groups, separate the service group names with a comma.
Note: This is an administrative subcommand. You must have EGO_SERVICE_CONTROL permission on all the services that you want to stop, and EGO_SERVICEGROUP_VIEW permission. - service_name
- Stops the specified services.
To specify multiple services, separate the service names with a space.
- -p consumer_name
- Stops all the services for the specified consumer. You can specify a consumer name or you can specify the path for a leaf or non-leaf consumer. If you specify the path or the name for a non-leaf consumer, all registered services that belong to its descendents are stopped. If you specify the consumer path as "/", all registered services of the cluster are stopped.
- all
- Stops all registered services.
service view [-MDS] [service_name...] | [service_name... -p [-o out_file]] | [-g service_group_name,...
Displays registered services and service groups defined in EGO service controller. You see everything that is configured in the service profile for the service, such as the service name, service group affiliations, Docker related parameters for the service definition, and so on.- -MDS
- Displays information about services used only for multidimensional scheduling. If this flag is not set, information about services used for slot-based scheduling is included.
- service_name
- Displays information about the specified services.
To specify multiple services, separate the service names with a space.
- -o out_file
- Specifies the path to the output file where the service XML should be saved. The file should not
exist, as it will be created by the CLI.
To specify multiple services, separate the service names with a space.
- -g service_group_name
- Displays all the services that belong to one or more specified service groups.
To specify multiple service groups, separate the service group names with a comma.
Note: If you do not have EGO_SERVICE_VIEW permission for some services, the output will only show the services that you have permission to view. If you do not have EGO_SERVICE_VIEW permission to view the service group information and the service group name is not specified, the Service Group INFO section will not display the service groups the service belongs to.
service listinstance [service_name] [-l]
Displays information about the service instances of the specified service including the URLs of the hosts where the instances are running.- service_name
- Specifies the service to which this action applies. If the service name is not specified, information for all service instances is displayed.
- -l
- Provides the same information with a longer name field, if information is truncated when -l is not specified.