Top
Systemwalker Runbook Automation Reference Guide
Systemwalker

3.15.8 Service Library

The service library provides the following classes:

Article number/class name

3.15.8.1 Service

3.15.8.1 Service

Class Name

Swrba_Service

List of Methods

Method

Description

String service_process_start_check(String servicename, String processname, String hostname, String username, String password, String ostype, String execusername, String execpassword)

Confirm the start status of services or processes on the specified host.

"Success" is returned if confirmation of the start status of the service or process was successful.

An exception is returned if confirmation of the start status of the service or process failed.

String service_process_stop_check(String servicename, String processname, String hostname, String username, String password, String ostype, String execusername, String execpassword)

Confirm the stop status of services or processes on the specified host.

"Success" is returned if confirmation of the stop status of the service or process was successful.

An exception is returned if confirmation of the stop status of the service or process failed.

String service_start_check(String servicename, String hostname, String username, String password, String ostype)

Confirm whether the service of the specified host is running.

"Success" is returned if confirmation of the start status of the service was successful.

An exception is returned if confirmation of the start status of the service failed.

String service_stop_check(String servicename, String hostname, String username, String password, String ostype)

Confirm whether the service of the specified host has stopped

"Success" is returned if confirmation of the stop status of the service was successful.

An exception is returned if confirmation of the stop status of the service failed.

String start_service(String service, String hostname, String username, String password, String ostype, String execusername, String execpassword)

Start the service of the specified host.

"Success" is returned if start of the service was successful.

An exception is returned if start of the service failed.

String stop_service(String service, String hostname, String username, String password, String ostype, String execusername, String execpassword)

Stop the service of the specified host.

"Success" is returned if stop of the service was successful.

An exception is returned if stop of the service failed.

Integer return_code()

Return the return value of the results of each method.

Input Information

servicename	Specify the name of the service to be checked if it is running or stopped.
processname	Specify the name of the process to be checked if it is running or stopped.
serviceSpecify the name of the service to be started or stopped.
hostname	Specify the host name or IP address.
username 	Specify the name of the user using SSH to connect to the host where operations are performed.
If the operation component connects with the file transfer infrastructure, the connected user name will be fixed at either of the following names and cannot be changed. In this case, the user name is ignored even if specified.
- If the Business Server is running on Windows: SYSTEM user
- If the Business Server is running on Linux: root
password	Specify the password of the user using SSH to connect to the host where operations are performed.
If the operation component connects with the file transfer infrastructure, the password is ignored even if specified.
ostype	Specify the operating system of the host where operations are performed.
execusername	Specify the name of the user executing the operation.
If the host specified by the "hostname" option is running on Windows and the connection is made using the file transfer infrastructure, execute the command as a SYSTEM user. In this case, the user name is ignored even if specified.
execpassword	This library does not use the value of "execpassword".
The value of "execpassword" is ignored even if specified.

Notes

File Location

Windows

<Installation directory>\SWRBAM\rbaope\bin\parts\lib\

standard\swrba_service.rb

Linux

/opt/FJSVswrbam/rbaope/bin/parts/lib/standard/swrba_service.rb