Managing Command Operation Tasks
A bastion host supports fast operations. You can manage many resources concurrently by executing commands. 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 supported by professional editions only.
- 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 Operation module.
- You have obtained the access permissions for the resources.
- The network connections between the managed hosts and the bastion host are normal.
Procedure
- Log in to your bastion host system.
- In the navigation pane on the left, choose .
- Click the CMD Console tab. The fast command operation page is displayed.
- Configure fast command operation information. Figure 1 Command console
Table 1 Fast command operation parameters Parameter
Description
CMD
Enter the command to be executed for host resources.
execute account
- Add an execution account or account group: Click Select. On the Execute Account or Execute Account Group tab page, select a resource account or account group from the Selectable accounts or Selectable account groups area, click
to move it to the Selected accounts or Selected account groups area, and click OK. - Remove an execution account or account group: Click Select. On the Execute Account or Execution Account Group tab page, select the desired resource account or account group in the Selected accounts or Selected Account Groups area, click
to move it to the Selectable accounts or Selectable account groups area, and click OK. - Reset an execution account or account group: Click Reset to clear the added execution 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.
- Add an execution account or account group: Click Select. On the Execute Account or Execute Account Group tab page, select a resource account or account group from the Selectable accounts or Selectable account groups area, click
- Execute the command task.
Click Execute next to the CMD text box to execute the command operation task.
- Stop the command operation task. Click Stop to stop the task.
If you stop execution, the system completes the operation on the currently running account, then immediately aborts tasks for all pending accounts.
- 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
- In the execution result area, enter a keyword in the search box to quickly query the task execution result by resource name, execution result, host address, or execution account.
- Click Expand to view the execution results of the corresponding task.
- Click Export to download the corresponding execution logs in CSV format.