tw_service_control
The tw_service_control
utility enables you to start, stop, restart, and view the status of the BMC Discovery services on a stand-alone appliance. For information about controlling services across a cluster, see tw_cluster_control.
You must be logged in as the tideway
user to use the tw_service_control
utility. You cannot specify a user name and password as with the other tw_*
utilities.
To use the utility, enter the following command:
tw_service_control [options] services
where options are any of the options described in the following table. The common command line options are described in Using command line utilities, and services is an optional list of services.
Command Line Option | Description |
---|---|
| Makes the operation conditional, that is, checks the status of the service or services before performing the operation. Use in conjunction with |
| Restart local BMC Discovery application services. |
| Start local BMC Discovery application services. |
| Show status of local BMC Discovery application services and the process ID for each service. If you run the utility with no options, it is the same as running it with the |
| Stop local BMC Discovery application services. |
The following are permissible services:
- security
- model
- vault
- discovery
- mainframe_provider
- sql_provider
- cmdb_sync_exporter
- cmdb_sync_transformer
- reasoning
- tomcat
- reports
- external_api
- appserver
User examples
The following examples show usage of the tw_service_control
utility.
Show the current status of the local BMC Discovery services
In this example the External API service is not running.
[tideway@appliance01 ~]$ tw_service_control --status BMC Discovery application services are running Security service: 1458 [ OK ] Model service: 1506 [ OK ] Vault service: 1634 [ OK ] Discovery service: 3281 [ OK ] Mainframe Provider service: 1772 [ OK ] SQL Provider service: 1834 [ OK ] CMDB Sync (Exporter) service: 1897 [ OK ] CMDB Sync (Transformer) service: 1979 [ OK ] Reasoning service: 2033 [ OK ] Tomcat service: 2273 [ OK ] Reports service: 2444 [ OK ] External API service: [ STOP ] Application Server service: 2575 [ OK ] [tideway@appliance01 ~]$
Stopping and starting a service
In this example, the external_api
service is running. The service is stopped, and then the command to stop it is re-issued, resulting in the operation being skipped.
[tideway@appliance01 ~]$ tw_service_control --stop external_api Stopping local BMC Discovery application services Stopping External API service: [ OK ] [tideway@appliance01 ~]$ [tideway@appliance01 ~]$ tw_service_control --stop external_api Stopping local BMC Discovery application services Stopping External API service: [ SKIP ] [tideway@appliance01 ~]$ [tideway@appliance01 ~]$ tw_service_control --start external_api Starting local BMC Discovery application services Starting External API service: [ OK ] [tideway@appliance01 ~]$
Conditionally stopping and starting a service
In this example, the external_api
service is running. The service is stopped, and then the command to stop it is re-issued. The --conditional
option makes the utility check the status of the service, and after it finds that it is already stopped, does not attempt to stop it again.
[tideway@localhost ~]$ tw_service_control --conditional --stop external_api Stopping running local BMC Discovery application services Stopping External API service: [ OK ] [tideway@localhost ~]$ [tideway@localhost ~]$ tw_service_control --conditional --stop external_api Stopping running local BMC Discovery application services [tideway@localhost ~]$
Restarting a service
In this example, the external_api
service is running.
[tideway@appliance01 ~]$ tw_service_control --restart external_api Restarting local BMC Discovery application services Stopping External API service: [ OK ] Starting External API service: [ OK ] [tideway@appliance01 ~]$
Conditionally restarting a service
In this example, the external_api
service is currently stopped.
[tideway@appliance01 ~]$ tw_service_control --conditional --restart external_api Restarting local BMC Discovery application services Starting External API service: [ OK ] [tideway@appliance01 ~]$
Restarting all services
This example shows all services being restarted.
[tideway@appliance01 ~]$ tw_service_control --restart Restarting local BMC Discovery application services Stopping Application Server service: [ OK ] Stopping External API service: [ OK ] Stopping Reports service: [ OK ] Stopping Tomcat: [ OK ] Stopping Reasoning service: [ OK ] Stopping CMDB Sync (Transformer) service: [ OK ] Stopping CMDB Sync (Exporter) service: [ OK ] Stopping SQL Provider service: [ OK ] Stopping Mainframe Provider service: [ OK ] Stopping Discovery service: [ OK ] Stopping Vault service: [ OK ] Stopping Model service: [ OK ] Stopping Security service: [ OK ] Starting Security service: [ OK ] Starting Model service: [ OK ] Starting Vault service: [ OK ] Starting Discovery service: [ OK ] Starting Mainframe Provider service: [ OK ] Starting SQL Provider service: [ OK ] Starting CMDB Sync (Exporter) service: [ OK ] Starting CMDB Sync (Transformer) service: [ OK ] Starting Reasoning service: [ OK ] Starting Tomcat: [ OK ] Starting Reports service: [ OK ] Starting External API service: [ OK ] Starting Application Server service: [ OK ] Updating cron tables: [ OK ] Updating baseline: [ OK ] [tideway@appliance01 ~]$
Comments
I was just trying to do a TKU install and it stalled - When I look at the status of the services, they are all stopped - If I try and restart them, I get a 'The Naming service is not running' - the doc doesn't list the 'naming service' as a permissible service so I'm stuck
Hi Kory, the naming service is not a service managed by this tool, and would not be stopped due to applying a TKU, so I suspect a parallel event. I recommend raising a support request.
Log in or register to comment.