Top
Systemwalker Operation Manager V17.0.1 Reference Guide

15.3.2 swotclsh (Run Script Command)

This command allows you to run any Systemwalker Script you created by itself. It is used to pre-check the operation of scripts.

Description

Using this command, you can execute Systemwalker Scripts. The scripts run by this command include control statements, commands and Systemwalker extended commands standard with Tcl/Tk offered by Systemwalker. It is used to debug the script you created.

Synopsis

swotclsh scriptfile [parameter1 parameter2 ... ]

Option

scriptfile

Specify the name of a script file to run with its full path.

Note

While the extended commands offered by Systemwalker Operation Manager are executable, those offered by Systemwalker Centric Manager are not.

parameter1 parameter2 ...

Specify the arguments passed to scriptfile.

Return Values

The return value can be manipulated in the description of script files to run. Note that the return values that scripts may return must be within a range from 0 to 128.

0 - 128:

Result code of execution script

129 - 255:

Error in script execution command

The return value is the same as the error message (messages starting with "swotclsh:") ID, which is simultaneously output to the standard error output.

Command Location

Windows

Systemwalker Operation Manager installation directory\MpWalker.JM\bin

Solaris

/usr/bin

Caution

If an error caused by a script file to run has occurred, a message indicating script file name or line number without its label is output to the standard error output. Below are examples of the error message output.

Examples

[Windows]

The following example performs a test run of the script file c:\home\scripts\a.swt.

swotclsh c:\home\scripts\a.swt

[UNIX]

The following example performs a test run of the script file /home/scripts/a.swt.

swotclsh /home/scripts/a.swt

Execution Results/Output Format

The output format of execution results depends on the processing of a.swt.

The output result appears on a terminal if a.swt is writing information to the standard output/standard error output within a script (puts stdout xxxxx, puts stderr xxxxx).