操作管理Operations management

.show operations.show operations

.show operations 命令返回一个表,其中包含了最近两周内执行的、所有正在运行和已完成的管理操作(这当前是保留期配置)。.show operations command returns a table with all administrative operations, both running and completed, which were executed in the last two weeks (which is currently the retention period configuration).

语法Syntax

语法选项Syntax option 说明Description
.show operations.show operations 返回集群正在处理的所有操作或集群已处理的操作Returns all operations that the cluster is processing or operations the cluster has processed
.show operations OperationId.show operations OperationId 返回特定 ID 的操作状态Returns operation status for a specific ID
.show operations (OperationId1, OperationId2, ...).show operations (OperationId1, OperationId2, ...) 返回特定 ID 的操作状态Returns operations status for specific IDs

结果Results

输出参数Output parameter 类型Type 说明Description
IDID StringString 操作标识符Operation Identifier
操作Operation StringString 管理员命令别名Admin command alias
NodeIdNodeId StringString 如果命令具有远程执行(例如,DataIngestPull)- NodeId 将包含正在执行的远程节点的 IDIf the command has a remote execution (for example, DataIngestPull) - NodeId will contain the ID of the executing remote node
StartedOnStartedOn DateTimeDateTime 操作开始的日期/时间(以 UTC 为单位)Date/time (in UTC) when the operation started
LastUpdatedOnLastUpdatedOn DateTimeDateTime 上次更新操作的日期/时间(以 UTC 为单位)(可以是操作中的步骤,也可以是完成步骤)Date/time (in UTC) when the operation last updated (can be either a step inside the operation, or a completion step)
持续时间Duration DateTimeDateTime LastUpdateOn 和 StartedOn 之间的 TimeSpanTimeSpan between LastUpdateOn and StartedOn
状态State StringString 命令状态 - 值可能是“InProgress”、“Completed”或“Failed”Command state - Can have values of "InProgress", "Completed", or "Failed"
状态Status StringString 包含失败操作错误的其他帮助字符串Additional help string that contains errors of failed operations

示例Example

IDID 操作Operation 节点 IDNode ID 开始日期Started On 上次更新日期Last Updated On 持续时间Duration 状态State 状态Status
3827def6-0773-4f2a-859e-c02cf395deaf3827def6-0773-4f2a-859e-c02cf395deaf SchemaShowSchemaShow 2015-01-06 08:47:01.00000002015-01-06 08:47:01.0000000 2015-01-06 08:47:01.00000002015-01-06 08:47:01.0000000 0001-01-01 00:00:00.00000000001-01-01 00:00:00.0000000 已完成Completed
841fafa4-076a-4cba-9300-4836da0d9c75841fafa4-076a-4cba-9300-4836da0d9c75 DataIngestPullDataIngestPull Kusto.Azure.Svc_IN_1Kusto.Azure.Svc_IN_1 2015-01-06 08:47:02.00000002015-01-06 08:47:02.0000000 2015-01-06 08:48:19.00000002015-01-06 08:48:19.0000000 0001-01-01 00:01:17.00000000001-01-01 00:01:17.0000000 已完成Completed
e198c519-5263-4629-a158-8d68f7a1022fe198c519-5263-4629-a158-8d68f7a1022f OperationsShowOperationsShow 2015-01-06 08:47:18.00000002015-01-06 08:47:18.0000000 2015-01-06 08:47:18.00000002015-01-06 08:47:18.0000000 0001-01-01 00:00:00.00000000001-01-01 00:00:00.0000000 已完成Completed
a9f287a1-f3e6-4154-ad18-b86438da0929a9f287a1-f3e6-4154-ad18-b86438da0929 ExtentsDropExtentsDrop 2015-01-11 08:41:01.00000002015-01-11 08:41:01.0000000 0001-01-01 00:00:00.00000000001-01-01 00:00:00.0000000 0001-01-01 00:00:00.00000000001-01-01 00:00:00.0000000 正在进行InProgress
9edb3ecc-f4b4-4738-87e1-648eed2bd9989edb3ecc-f4b4-4738-87e1-648eed2bd998 DataIngestPullDataIngestPull 2015-01-10 14:57:41.00000002015-01-10 14:57:41.0000000 2015-01-10 14:57:41.00000002015-01-10 14:57:41.0000000 0001-01-01 00:00:00.00000000001-01-01 00:00:00.0000000 已失败Failed 集合已修改。Collection was modified. 枚举操作可能不会执行。Enumeration operation may not execute.

.show operation details.show operation details

操作可以(可选)长期保留其结果,并且可以在操作完成时使用 .show operation details 来检索结果。Operations can (optionally) persist their results, and the results can be retrieved when the operation is complete, using .show operation details.

备注

并非所有控制命令都能长期保留其结果。Not all control commands persist their results. 这些命令仅在默认情况下针对异步执行时才通过使用 async 关键字来这样做。Those commands that do, usually do so by default on asynchronous executions only, using the async keyword. 请参阅有关特定命令的文档,然后检查命令是否执行此操作。See the documentation for the specific command and check if it does. 例如,请参阅数据导出)。For example, see data export). .show operations details 命令的输出架构与从同步执行命令返回的架构相同。The output schema of the .show operations details command is the same schema returned from the synchronous execution of the command. 仅在成功完成操作后才能调用 .show operation details 命令。The .show operation details command can only be invoked after the operation completed successfully. 运行此命令前,请使用 show operations 命令)检查操作的状态。Use the show operations command) to check the state of the operation, before running this command.

语法Syntax

.show operation OperationId details.show operation OperationId details

结果Results

每种操作的结果都不同,并且在同步执行时,与操作结果的架构匹配。The result is different per type of operation, and matches the schema of the operation result, when executed synchronously.

示例Examples

该示例中的 OperationId 从其中一个数据导出命令的异步执行返回。The OperationId in the example, returns from an asynchronous execution of one of the data export commands.

.export 
  async 
  to csv ( 
    h@"https://storage1.blob.core.chinacloudapi.cn/containerName;secretKey", 
    h@"https://storage1.blob.core.chinacloudapi.cn/containerName2;secretKey" 
  ) 
  <| myLogs 

async export 命令返回了以下操作 ID:The async export command returned the following operation ID:

OperationIdOperationId
56e51622-eb49-4d1a-b896-06a03178efcd56e51622-eb49-4d1a-b896-06a03178efcd

命令完成后,可以使用此操作 ID 查询导出的 blob。This operation ID can be used when the command has completed to query the exported blobs.

.show operation 56e51622-eb49-4d1a-b896-06a03178efcd details 
PathPath NumRecordsNumRecords
http://storage1.blob.core.chinacloudapi.cn/containerName/1_d08afcae2f044c1092b279412dcb571b.csv 1010
http://storage1.blob.core.chinacloudapi.cn/containerName/2_454c0f1359e24795b6529da8a0101330.csv 1515