We recommend that you review the results and status of a command execution after running a command to ensure the target operation has completed properly. Note that there is no difference between running a cloud assistant command on the console and running a command while logged on to the instance.

Prerequisite

The command has been run at least once.

View command execution results

To view command execution results on the ECS console, follow these steps:

  1. Log on to the ECS console.
  2. In the left-side navigation pane, select Cloud Assistant.
  3. Select the target region.
  4. In the Execution Record area, search for the execution record of the target command execution, and select View Results from the Operation column.
  5. In the pop-up window that is displayed, select an execution record and click to expand the command execution record.

You can also use the ECS API DescribeInvocationResults to view command results.

View command execution status

To view the status of a command execution in the ECS console, follow these steps:

  1. Log on to the ECS console.
  2. In the left-side navigation pane, select Cloud Assistant.
  3. Select the target region.
  4. In the Execution Record area, search for the execution record of the target command execution, and view the status of the command execution in the Execution Status column.

You can also use the ECS API DescribeInvocations to view command execution status.

Lifecycle of command invocation

A command may have the following status when running on an instance.

Table 1. The status of commands executed on an instance
Command status API status Description
Being executed Running The command is being executed.
Stopped Stopped You stop a command during its execution.
Execution finished Finished The command invocation is finished. However, this does not mean the invocation is successful. You can check whether the invocation is successful by checking the actual output (Output) of the command process.
Execution failed Failed The command invocation is not finished for some reason when the timeout time (Timeout) is reached.

To facilitate the management of bulk or periodical execution, you can manage the lifecycle of command execution from the perspectives of overall invocation status, instance invocation status, and invocation record status. The relationships among various levels are shown in the following figure.

Figure 1. Relationships among the invocation status


Table 2. Lifecycle of one-time batched execution
Status Command invocation Displayed status
Overall invocation status The invocation status of all instances are Finished (Finished). Finished

The invocation status of some instances are Finished (Finished),

while the status of other instances are Stopped (Stopped).

The invocation status of all instances are Failed (Failed). Failed
The invocation status of all instances are Stopped (Stopped). Stopped
The invocation status of all instances are Running (Running), or that of some instances is Running (Running). Running
The invocation status of some instances are Failed (Failed). Partially failed
Instance invocation status One-time batched execution is a one-off operation, so the instance invocation status is the same as the invocation record status.
Invocation record status See the table The status of commands executed on an instance.

Take three ECS instances for example. The following figure shows the relationships between the overall invocation status and the instance invocation status during a one-time execution on multiple instances.

Figure 2. Lifecycle of one-time batched execution


Table 3. Lifecycle of periodical execution
Status Description
Overall invocation status The overall invocation status remains Running (Running) unless you stop the invocation on all instances.
Instance invocation status The instance invocation status remains Running (Running) unless you stop the invocation.
Invocation record status See the table The status of commands executed on an instance.