Use the command automation task to create and run a command
definition, which specifies the command-line program that you want
to run on a managed system.
You can create a command definition, create one based on an existing
command definition, or edit an existing command definition.
About this task
Note: This topic describes how to access this task in
the IBM® Flex System Manager Web user interface. If you
are using the IBM FSM Explorer, use the finder
at the top of the user interface (shown here) to locate this task:
Note: - Command automation is supported only on systems on which Common Agent is installed.
- Remember that anything a system-account user
can do from a command line can be done to the system, regardless
of the user who is logged in to the managed system.
To create or edit a command definition, perform the
following steps:
Procedure
- On
the Initial Setup tab of the Home page, click Chassis Manager.
On the Chassis Manager page, type Command Automations in
the Find field, then click Command Automations in
the resulting list on the Tasks tab.
- Determine if you want to create a command
definition, create a command definition based on an existing one,
or edit an existing command definition.
- If you want to create a command definition, click Create.
- If you want to create a command definition that is based on
an existing command definition, select a command definition from the
table, then click Create Like.
- If you want to edit an existing command definition, select
a command definition from the table, then click Edit.
- In the Create Command Definitions window,
specify information about the command definition:
- Accept the default name for the command definition or
type a new name in the Name field.
- In the Command to run field,
type the fully qualified file name and command syntax. Consider the
following information:
- For managed systems running IBM i, the command
is run in the Qshell environment. To run an IBM i system command
(such as the call command), specify the command
similar to the following example:
system 'call mylib/myclpgm'
The
command runs within the Qshell environment and enables you to access
the
IBM i system
commands.
- For managed systems running Windows, preface the
command with the following string to ensure that it runs in a Windows command-shell
window:
cmd /c
- In the Timeout field, type a
timeout value, in seconds. The timeout value specifies
the number of seconds to wait for the command either to return a completion
code or time out. Make sure that the timeout value is long enough.
- Select the Log check box if you
want to log any output produced by the command, for example, a directory
listing.
- Either accept the default user ID (or the existing user
ID if you clicked Edit or Create
Like) or type a new user ID that has the required authority
to perform the command. If you want to run the process using an alternative
user account and override the default user ID, you can specify a user
ID and password in the Login group box.
Note: (Managed systems running IBM i only) Commands
cannot be performed using the default user ID that is shipped with IBM Flex
System Manager. For a command
definition to run successfully on IBM i systems, the command
definition must specify a valid user ID and password, or the managed system to which it
is being run must be configured to specify a user that has the authority
to run the command definition. You can register that user in the IBM Director Agent default user function
ID on the managed system system
using Application Administration in Power Systems™ Navigator.
Note: You
either must specify an alternative user ID or remove the default user
ID from the registered function and add a new default user ID that
has the required authority to perform the command.
- Click OK to save the command
definition.
Results
The
Command Automation page displays
the new command definition.