Updated on 2024-06-12 GMT+08:00

Managing Command Operation Tasks

CBH gives you the ability to manage multiple resources concurrently by executing commands, improving O&M efficiency. You can execute the same command on multiple host resources that use the SSH protocol through one task, and the corresponding execution results are returned accordingly.

This topic describes how to manage command tasks, including creating, executing, and stopping command tasks, and viewing task execution results.

Constraints

  • Fast operation is available only in the CBH professional editions.
  • Fast operation tasks apply only to Linux hosts using the SSH protocol.
  • Currently, Fast operation tasks cannot be performed on Windows host, database, or application resources.

Prerequisites

  • You have the management permissions for the Fast Ops module.
  • You have obtained the access permissions for the resources.
  • The network connections between the managed hosts and the CBH system are normal.

Procedure

  1. Log in to the CBH system.
  2. Choose Operation > Fast Ops > COM Console to go to the quick command OM page.

    Figure 1 Command console

  3. Configure fast command operation information.

    Table 1 Fast command operation parameters

    Parameter

    Description

    CMD

    Enter the command to be executed for host resources.

    execute account

    • The managed resource account allowed to execute the script. You can select a created SSH account or account group.
    • You can also Reset the selected account or account group.
    NOTE:

    You can select a maximum of one account for each resource.

    Options

    (Optional) If you have no permissions for the selected accounts, select Sudo to escalate your privilege and execute the task under the sudoers file.

  4. Execute the command task.

    Click Execute next to the CMD text box to execute the command operation task.

  5. Stop the command operation task.

    Click Stop to stop the task.

    Stopping a task cannot stop the corresponding job that is being executed on a certain resource.

  6. View the execution results.

    After the command operation task is executed, check the execution results. To view execution results of historical operation tasks, see Viewing Execution Logs

    1. In the execution result area, enter a keyword in the search box to quickly query the task execution result by resource name, execution result, or execution account.
    2. Click Expand to view the execution results of the corresponding task.
    3. Click Export to download the corresponding execution logs in CSV format.
      Figure 2 Command operation task results