Hitachi

JP1 Version 12 JP1/Integrated Management 2 - Manager GUI Reference


3.40 Execute Command window

The Execute Command window is used to execute commands on a managed host (agent host or manager host) or on the client host (viewer host).

To open the Execute Command window, the user must have JP1_Console_Admin permission or JP1_Console_Operator permission. This window is displayed when one of the following operations is performed:

The following figure shows an example of the Execute Command window.

Figure 3‒76: Execute Command window

[Figure]

Command buttons can be displayed in this window. The following figure shows an example of the Execute Command window in which command buttons are displayed.

Figure 3‒77: Execute Command window (with command buttons displayed)

[Figure]

The following describes the items displayed in the Execute Command window.

Command buttons

Command buttons are buttons for executing commands that are set in the command button definition file. When a command button is clicked, the command associated with the button is executed. Users can specify the names of command buttons. The maximum length of each command button name is eight characters.

When the user hovers the mouse pointer over a command button, the information registered for the Target host, Command, and Environment variable file boxes is displayed. While this information is displayed, the user cannot use the Target host and Command boxes, the Clear History button, the Environment variable file box, and the Execute button. The user who will click a command button must check the displayed information before clicking the button. Note, however, that if the target host name is not registered as a command button, the user can access the Target host box.

When the user right-clicks a command button, a pop-up menu is displayed. The commands that can be executed from the menu include Custom Execution. When Custom Execution is chosen, the information set for the command button is reflected to the Target host, Command, and Environment variable file boxes.

Command buttons can be set to display a confirmation message before command execution or to start execution immediately without displaying the message. On the command buttons that are set to immediate execution, the string [Execute] is displayed after the button names.

The procedure for setting command buttons is described in the JP1/Integrated Management 2 - Manager Configuration Guide, but the relevant section differs according to the platform. If the platform is Windows, see 1.15 Setting up a command execution environment (for Windows). If the platform is UNIX, see 2.14 Setting up a command execution environment (for UNIX).

Command type

The type of the command to be executed is selected from the following radio buttons. This field is not displayed when the version of the connected JP1/IM - Manager is earlier than 10-00.

Command of managed host

Select this radio button to execute a command on a managed host (agent host or manager host).

Client application

Select this radio button to execute a client host (viewer host).

Event information to inherit

This area displays the event that the command will inherit (event to be inherited). This field is not displayed when the version of the connected JP1/IM - Manager is earlier than 10-00.

The event to be inherited can be changed by performing one of the following operations:

  • In the Event Console window, select a JP1 event, and then, from the View menu, choose Execute Command (Event Inheritance).

  • In the Event Console window, select and right-click a JP1 event, and then choose Execute Command (Event Inheritance).

  • In the Event Details window or the Edit Event Details window, click the Execute Command button.

  • In the Related Events (Summary) window or the Related Events (Correlation) window, select and right-click a JP1 event, and then choose Execute Command (Event Inheritance).

Inherit event information

Select this check box if the command needs to inherit the event information during execution.

If this check box is not selected, the command will not inherit event information.

Target host

Specifies the name of a host on which a command is to be executed. The host name specified in the box cannot exceed 255 bytes and must be a host name that is set as a managed host in the system configuration definition. This text box is disabled when the Client application radio button is selected. If the function for restricting reference permissions and operation permissions is enabled for business groups (ON is set for the -bizmonmode option of the jcoimdef command), specify the name of a host that belongs to a business group that the logged-in JP1 user can view. For details about the jcoimdef command, see jcoimdef in 1. Commands in the manual JP1/Integrated Management 2 - Manager Command, Definition File and API Reference.

A host group name that is defined in the host group definition file can be specified.

A business group name or monitoring group name that has no more than 2,048 bytes can also be specified. If a character string in path format is specified, the character string is treated as a business group name or monitoring group name. However, if the integrated monitoring database and the IM Configuration Management database are disabled, the specified character string is treated as a host name or host group name even if the string is in path format.

A host name specified in the past can be selected from the drop-down list. A maximum of five hosts per viewer specified in the past can be stored for one user.

Note that commands executed via command buttons are not recorded in the command history.

The attribute information for a JP1 event displayed in Event information to inherit can also be specified by using a variable. For example, if you want to execute a command on the event-issuing host, specify $EVHOST. For details about the variables that can be specified, see 44.19.5 Inheriting event information when a command is executed in the JP1/Integrated Management 2 - Manager Overview and System Design Guide.

Note:

A large number of agents are requested at once to execute a command, a heavy load might be applied on the manager host. To reduce the load, we recommend that you divide the agents into host groups each of, and then execute the command for each group.

Command

Specifies the command line to be executed.

The command line specified in the box cannot exceed 4,096 bytes. Note, however, that the maximum length of the command that can be executed from JP1/IM - View depends on the system that runs JP1/IM and JP1/Base.

The attribute information for a JP1 event displayed in Event information to inherit can also be passed to the command as a parameter of the command by using a variable. For details about the variables that can be specified, see 44.19.5 Inheriting event information when a command is executed in the JP1/Integrated Management 2 - Manager Overview and System Design Guide.

If the Command of managed host radio button is selected in the Command type area:

A command line specified in the past can be selected from the drop-down list.

This drop-down list displays the last five command lines that were specified when the Command of managed host radio button was selected.

A maximum of five command lines per viewer specified in the past can be stored for one user. Note, however, that commands executed via command buttons are not recorded in the command history.

The following describes the types of commands that can be specified for Command.

  • On a Windows host, the following types of commands can be executed:

    Executable files (.com and .exe)

    Batch files (.bat)

    Script files of JP1/Script (.spt) (An association must be set for .spt files so that they can be executed.)

    Data files (such as .vbs) that have file types (extensions) associated with applications that can be executed by an automated action

  • On a UNIX host, the following types of commands can be executed:

    UNIX commands

    Shell scripts

Note that the following commands cannot be executed:

  • Commands requiring user interaction

  • Commands displaying windows

  • Commands with an escape sequence or control code specified

  • Commands that do not stop, such as daemons

  • Windows message functionality, DDE commands, and other commands requiring interaction with the Desktop (in Windows only)

  • Commands that shut down the OS, such as shutdown and halt

If the Client application radio button is selected in the Command type area:

A command line specified in the past can be selected from the drop-down list.

This drop-down list displays the last five command lines that were specified when the Client application radio button was selected.

A maximum of five command lines per viewer specified in the past can be stored for one user. Note, however, that commands executed via command buttons are not recorded in the command history.

Clear History

Clicking this button clears all command lines specified in the past from the drop-down list. This button can be used when there is no need to save the history of commands executed in the past.

If the Command of managed host radio button has been selected, the history of command lines that were executed when the Command of managed host radio button was selected is cleared.

If the Client application radio button has been selected, the history of command lines that were executed when the Client application radio button was selected is cleared.

Environment variable file

Specifies the name of the environment variable file saved on the host on which the command is executed. Specify a full path name of 255 or fewer bytes. This text box is disabled when the Client application radio button is selected.

Environment variables are set as specified in the file before the command is executed.

The attribute information for a JP1 event displayed in Event information to inherit can also be passed to the command as a parameter of the command by using a variable. For details about the variables that can be specified, see 44.19.5 Inheriting event information when a command is executed in the JP1/Integrated Management 2 - Manager Overview and System Design Guide.

Execute

How the system behaves when this button is clicked differs depending on whether the Inherit event information check box in the Event information to inherit area is selected:

  • If the Inherit event information check box is selected:

    Clicking this button opens the Preview Command Execution Content window.

  • If the Inherit event information check box is not selected:

    Clicking this button executes the specified command.

Log

This area displays the results of commands that were executed by clicking the Execute button or a command button. The time the command was executed, the name of the host on which the command was executed, and the message output to the standard output or standard error output are displayed. When a list header (Time, Host, or Message) is clicked, the list is sorted by time, host name, or message.

The results of commands executed from the Execute Command window are displayed in the list box until the window is closed.

The maximum number of items that can be displayed in the Log area is set by Lines of execution results to display in the Preferences window. If the maximum number of items that can be displayed in this area is exceeded, the oldest item, regardless of the sort order, is deleted.

Clear

Clicking this button clears the command execution results listed in the Log area.