DescribeProcessList - 查看集群正在运行的查询

更新时间:
复制为 MD 格式

调用 DescribeProcessList 接口查看实例正在运行的查询。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

当前API暂无授权信息透出。

请求参数

名称

类型

必填

描述

示例值

DBClusterId

string

AnalyticDB MySQL 湖仓版集群 ID。

说明

您可以调用 DescribeDBClusters 接口查看目标地域下所有 AnalyticDB MySQL 湖仓版集群的详情,包括集群 ID。

amv-xxxxxxxxx

ShowFull

boolean

是否展示完整的 SQL 语句。取值说明:

  • True:展示完整的 SQL 语句。

  • False:只展示 SQL 语句的前 100 个字符。

说明

默认值 False。

True

RunningTime

integer

按运行时间过滤,展示大于该运行时间的查询。单位:秒。

20

User

string

数据库账号。

admin

Keyword

string

过滤关键字,目前仅支持过滤 SELECT

SELECT

Order

string

按指定字段排序,JSON 格式,[{"Field":"Time","Type":"Desc" },{ "Field":"User", "Type":"Asc" }],取值说明:

  • Field:需要排序的字段名,支持 Time,User,Host,DB 字段。

  • Type:排序类型,Desc 为降序,Asc 为升序。

[ { "Field":"Time","Type":"Desc" }, { "Field":"User", "Type":"Asc" }]

PageSize

integer

每页记录数,取值:

  • 30(默认值)

  • 50

  • 100

30

PageNumber

integer

页码,取值为正整数。默认值为 1

1

返回参数

名称

类型

描述

示例值

object

TotalCount

string

总记录数。

10

PageSize

string

总页数。

30

RequestId

string

请求 ID。

1AD222E9-E606-4A42-BF6D-8A4442913CEF

PageNumber

string

页码。

1

Items

object

Process

array<object>

正在运行的查询列表。

object

StartTime

string

任务的开始时间,UTC 时间,格式:yyyy-MM-ddTHH:mm:ssZ。

2020-11-19T02:48:15Z

Time

integer

查询任务已运行时间。单位:秒。

40

ProcessId

string

任务的唯一标识,KILL PROCESS 时使用。

202011191048151921681492420315100****

Host

string

发起查询的 IP 地址。

192.168.XX.XX:12308

DB

string

数据库名。

adb_demo

Command

string

命令类型,仅支持 SELECT 类型。

SELECT

User

string

数据库账户。

admin

Id

integer

工作线程 ID。

49104

Info

string

正在运行的 SQL 语句,默认返回前 100 字符。当传入参数 ShowFull 为 True 时,显示全文。

select * from sbtest1,sbtest2,sbtest3,sbtest4

示例

正常返回示例

JSON格式

{
  "TotalCount": "10",
  "PageSize": "30",
  "RequestId": "1AD222E9-E606-4A42-BF6D-8A4442913CEF",
  "PageNumber": "1",
  "Items": {
    "Process": [
      {
        "StartTime": "2020-11-19T02:48:15Z",
        "Time": 40,
        "ProcessId": "202011191048151921681492420315100****",
        "Host": "192.168.XX.XX:12308",
        "DB": "adb_demo",
        "Command": "SELECT",
        "User": "admin",
        "Id": 49104,
        "Info": "select * from sbtest1,sbtest2,sbtest3,sbtest4"
      }
    ]
  }
}

错误码

HTTP status code

错误码

错误信息

描述

400 IncorrectModuleVersion The specified module version does not support this operation. 模块版本不支持该操作。
400 AnalyticDBKernelError Calling AnalyticDB Kernel error
404 InvalidDBCluster.NotFound The DBClusterId provided does not exist in our records. 您指定的 DBClusterId 不存在,请确认 DBClusterId 值是否正确。

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情