You can call this operation to query the queries that are being executed in a cluster.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeProcessList |
The operation that you want to perform. Set the value to DescribeProcessList. |
DBClusterId | String | Yes | am-bp1xxxxxxxx47 |
The ID of the cluster. |
ShowFull | Boolean | No | true |
Specifies whether to show a complete SQL statement. Default value: False. Valid values:
|
RunningTime | Integer | No | 5 |
The running time used to filter queries. Queries that take a longer time than the specified running time are displayed. Unit: seconds. |
User | String | No | test |
The user used to filter queries. |
Keyword | String | No | select |
The keyword in an SQL statement, which is used to filter queries. |
Order | String | No | [ { "Field":"Time", "Type":"Desc" }, { "Field":"User", "Type":"Asc" } ] |
The order in which queries are sorted in the JSON format based on the specified fields. Specify the fields used to sort the queries and the order type. Example:
In the preceding code, Field indicates the field used to sort queries. Valid values of Field: Time, User, Host, and DB. Type indicates the order type. Valid values of Type: Desc and Asc. A value of Desc indicates a descending order. A value of Asc indicates an ascending order. |
PageSize | Integer | No | 30 |
The number of entries to return on each page. Valid values:
Default value: 30. |
PageNumber | Integer | No | 1 |
The number of the page to return. Pages start from page 1. Default value: 1. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Items | Array of Process |
The list of tasks. |
|
Process | |||
Command | String | SELECT |
The type of the command. Valid values: INSERT and SELECT. |
DB | String | adb_demo |
The name of the database. |
Host | String | 192.168.XX.XX:12308 |
The IP address from which the query was initiated. |
Id | Integer | 49104 |
The ID of the worker thread. |
Info | String | select * from sbtest1,sbtest2,sbtest3,sbtest4 |
The SQL statement that is running. By default, the first 100 characters of the SQL statement are returned. If the ShowFull parameter is set to True, the complete SQL statement is returned. |
ProcessId | String | 202011191048151921681492420315100**** |
The unique ID of the process. This parameter is used when you use the KILL PROCESS statement. |
StartTime | String | 2020-11-19T02:48:15Z |
The start time of the task. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
Time | Integer | 11 |
The running time of the task. Unit: seconds. |
User | String | test |
The username. |
PageNumber | String | 1 |
The page number of the returned page. |
PageSize | String | 30 |
The number of entries returned per page. |
RequestId | String | 1AD222E9-E606-4A42-BF6D-8A4442913CEF |
The ID of the request. |
TotalCount | String | 1 |
The total number of entries returned. |
Examples
Sample requests
http(s)://[Endpoint]/? Action=DescribeProcessList
&DBClusterId=am-bp1xxxxxxxx47
&<Common request parameters>
Sample success responses
XML
format
<TotalCount>1</TotalCount>
<PageSize>30</PageSize>
<RequestId>1AD222E9-E606-4A42-BF6D-8A4442913CEF</RequestId>
<PageNumber>1</PageNumber>
<Items>
<Process>
<User>test</User>
<Command>SELECT</Command>
<StartTime>2020-11-19T02:48:15Z</StartTime>
<Time>11</Time>
<Host>192.168.XX.XX:12308</Host>
<ProcessId>202011191048151921681492420315100****</ProcessId>
<Id>49104</Id>
<Info>select * from sbtest1,sbtest2,sbtest3,sbtest4</Info>
<DB>adb_demo</DB>
</Process>
</Items>
JSON
format
{
"TotalCount": 1,
"PageSize": 30,
"RequestId": "1AD222E9-E606-4A42-BF6D-8A4442913CEF",
"PageNumber": 1,
"Items": {
"Process": {
"User": "test",
"Command": "SELECT",
"StartTime": "2020-11-19T02:48:15Z",
"Time": 11,
"Host": "192.168.XX.XX:12308",
"ProcessId": "202011191048151921681492420315100****",
"Id": 49104,
"Info": "select * from sbtest1,sbtest2,sbtest3,sbtest4",
"DB": "adb_demo"
}
}
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
404 | InvalidDBCluster.NotFound | The DBClusterId provided does not exist in our records. | The error message returned because the specified DBClusterId parameter does not exist. Check whether you specify the DBClusterId parameter correctly. |
For a list of error codes, visit the API Error Center.