Top
Systemwalker Runbook Automation Reference Guide
Systemwalker

3.15.5 Command Library

The command library provides the following classes:

Article number/class name

3.15.5.1 Command

3.15.5.1 Command

Class Name

Swrba_Command

List of Methods

Method

Description

String run(String hostname, String username, String password, String exec_username, String exec_password, String commandline)

Execute the command on the specified host.

"Success" is returned if execution of the command was successful.

An exception is returned if execution of the command failed.

Integer return_code()

Return the return value of the results of the command execution.

159 to 240 are returned if an internal error occurred during processing within a Ruby script.

String stdout()

Return the standard output of the results of the command execution.

String stderr()

Return the standard error output of the results of the command execution.

Input Information

hostname	Specify the host name or IP address.
commandline	Specify the command name and argument.
Username	Specify the name of the user using SSH to connect to the remote executing host.
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 or Solaris: root
password	Specify the password of the user using SSH to connect to the remote executing host.
If the operation component connects with the file transfer infrastructure, the password is ignored even if specified.
exec_usernameSpecify the executing user's name.
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.
exec_password	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_command.rb

Linux

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