Job Management Partner 1/Integrated Management - Manager Overview and System Design Guide
In JP1/IM, requests can be issued from the Event Console window to execute a command on a managed host. You perform this request in JP1/IM - View's Execute Command window. The entered execution request is forwarded to the specified host from the manager that you are logged in to, according to the system configuration defined in the JP1/Base configuration management. The command is then executed on the target host.
Figure 3-47 Overview of command execution from JP1/IM - View
The following describes the conditions required for command execution and the types of commands you can execute. This is followed by a description of the flow of processing for the execution.
- Organization of this subsection
- (1) Executable commands
- (2) Conditions for command execution
- (3) Checking the command execution status and result
- (4) Flow of processing for command execution
(1) Executable commands
The following types of commands can be executed from JP1/IM - View:
- On a Windows host:
- Executable file (.com or .exe)
- Batch file (.bat)
- Script file of JP1/Script (.spt) (provided the .spt file extension is associated with JP1/Script so that it can be executed)
- On a UNIX host:
- UNIX command
- Shell script
However, the following types of commands cannot be executed:
- Commands that require interactive operation
- Commands that display windows
- Commands that use an escape sequence or control code
- Non-terminating commands such as daemons
- Commands (Windows only) that require interaction with the desktop, such as the Windows message structure or DDE
- Commands that shut down the OS, such as shutdown and halt
(2) Conditions for command execution
The following conditions apply to command execution from JP1/IM - View:
- The JP1 user who requests command execution from JP1/IM - View must be registered in the authentication server and have the required permission for executing commands remotely.
- The system configuration must be defined using the JP1/Base configuration management.
- To execute a command on multiple hosts concurrently, the hosts must be grouped according to the host group definitions of the JP1/Base command execution function.
- The JP1 user issuing the request must be mapped to an OS user on the target host.
- To specify the command execution environment, you must first prepare an environment variable definition file on the target host.
(3) Checking the command execution status and result
In the Execute Command window of JP1/IM - View, you can check the status and result of an executed command. To view the command execution log, execute the jcocmdlog command on the manager.
A JP1 event can be issued to report the execution status of a command. Because JP1 events are not issued by default, you must change the settings for issuing JP1 events by specifying the -cmdevent option of the jcocmddef command.
- Note
- When multiple commands are executed, the results might be output in a different order from the execution order. The result output timing is affected by such things as the time required to execute each command, performance and workload differences among the hosts on which the commands are executed, and retry after a communication error.
- The Execute Command window in JP1/IM - View shows the command execution results at the time they were received by the manager. Therefore, when you open this window, the displayed result might be for a previously executed command.
- If you mistakenly execute a command that cannot be executed from JP1/IM - View (see (1) Executable commands), the command fails to terminate (message KAVB2013-I is not displayed in the Log area in the Execute Command window). In this situation, you can recover by using the status check and deletion commands provided by JP1/Base. For details, see 7.4.4(6) Commands for troubleshooting.
(4) Flow of processing for command execution
The following describes how the JP1/IM and JP1/Base functionality are inter-linked in command execution, taking as an example the flow of processing when a command is executed on an agent from a viewer.
The description below assumes that a JP1 user who has permission to execute commands is logged in to the manager. (For details about login requirements and the permissions required to execute commands, see 7.4.1 Managing JP1 users.)
Figure 3-48 Flow of processing for command execution (command executed remotely on an agent)
The flow of processing is described below, following the numbers in the figure:
- Open the Execute Command window in JP1/IM - View, and execute a command.
You can specify the target host, command name, and command execution environment in this window. (The command execution environment must be defined in advance by setting up an environment variable definition file on the target host.)
- On receiving the command execution request, JP1/Base on the manager host references the configuration definitions and passes the request to the target host.
- JP1/Base on the agent host where the request was received first references the user mapping definitions and then executes the command using the permissions of the mapped OS user.#
#: User mapping (JP1/Base user management) is processed on the target host where the command is to be executed. Thus, user mapping must be set up in advance on the agent to execute a command from JP1/IM - View on an agent, or on the manager to execute a command from JP1/IM - View on a manager.
- After the command has been executed, JP1/Base on the agent reports the result to the higher-level host defined in the configuration definitions.
- On receiving the command execution result, JP1/Base on the manager records the result in a command execution log (ISAM) file, and then reports the result to JP1/IM - View.
Command execution from JP1/IM - View is realized by the JP1/Base command execution function. See also 7.4.4 Managing command execution.
All Rights Reserved. Copyright (C) 2009, Hitachi, Ltd.