Mengkueri informasi sesi.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
oceanbase:DescribeProcessStatsComposition |
get |
*Instance
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
ID kluster OceanBase. |
ob******** |
| UId |
string |
No |
Pengidentifikasi pengguna database OceanBase. |
139************* |
| TenantId |
string |
No |
ID penyewa. Parameter ini wajib diisi. |
t******** |
| SqlText |
string |
No |
Pernyataan SQL. Kueri LIKE didukung. Anda hanya dapat menentukan sebagian klausa dari pernyataan SQL. |
SELECT **** FROM **** WHERE **** = ? AND **** = ? ORDER BY **** ASC |
| ClientIp |
string |
No |
IP klien. |
127.*.*.* |
| ServerIp |
string |
No |
IP server. |
127.*.*.* |
| Users |
string |
No |
Nama pengguna database. |
["test_user"] |
| Status |
string |
No |
Status sesi. |
ACTIVE |
| MergeDynamicSql |
boolean |
No |
Apakah akan menggabungkan SQL dinamis saat mengembalikan hasil. Catatan
|
false |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Hasil respons permintaan. |
||
| RequestId |
string |
ID permintaan. |
EE205C00-30E4-****-****-87E3A8A2AA0C |
| Data |
object |
Data respons. |
|
| TotalSessionCount |
integer |
Jumlah total sesi. |
100 |
| ActiveSessionCount |
integer |
Jumlah sesi aktif. |
60 |
| IdleSessionCount |
integer |
Jumlah sesi dalam status SLEEP. |
30 |
| AllProcessList |
array<object> |
Informasi detail tentang semua sesi. |
|
|
array<object> |
|||
| SqlText |
string |
The SQL text. |
select * from c1 where id = 100; |
| TenantId |
string |
The ID of the tenant. |
t******** |
| Database |
string |
The name of the database. |
c1 |
| User |
string |
The user to which the session belongs. |
test_user |
| ExecuteTime |
integer |
The definition of this parameter varies based on whether the SQL statement is executed.
|
5 |
| CpuTime |
integer |
The CPU time spent on executing the current SQL statement, in seconds. Catatan
This parameter is introduced since OceanBase Database V3.2.4 BP5. |
1 |
| ServerIp |
string |
The IP address of the server. |
xx.xx.xx.xx |
| ClientIp |
string |
The IP address of the client. |
xx.xx.xx.xx |
| SessionId |
integer |
The ID of the session. |
322441**** |
| ProxySessId |
string |
The session ID of the client. If an OceanBase Database Proxy (ODP) is used for connection, the session ID of the ODP is returned. |
7521015416******** |
| Command |
string |
The type of the SQL statement being executed in the session. |
Query |
| Status |
string |
The status of the session. |
ACTIVE |
| SqlId |
string |
The ID of the SQL statement. |
45CCBDC7DEBDCDAXXXXAFC******** |
| TraceId |
string |
The ID of the trace. |
YB420XXX128-00062XXXX8313XXX1-X-X |
| PlanId |
string |
The ID of the execution plan. |
1898 |
| DynamicSql |
string |
false |
|
| ProcessSqlLists |
array<object> |
||
|
array<object> |
|||
| SqlText |
string |
select * from c1 where id = 100; |
|
| TenantId |
string |
t******** |
|
| Database |
string |
c2 |
|
| User |
string |
test_user |
|
| ExecuteTime |
integer |
5 |
|
| CpuTime |
integer |
1 |
|
| ServerIp |
string |
xx.xx.xx.xx |
|
| ClientIp |
string |
xx.xx.xx.xx |
|
| SessionId |
integer |
322441**** |
|
| ProxySessId |
string |
7521015416******** |
|
| Command |
string |
Query |
|
| Status |
string |
ACTIVE |
|
| SqlId |
string |
45CCBDC7DEBDCDAXXXXAFC******** |
|
| TraceId |
string |
YB420XXX128-00062XXXX8313XXX1-X-X |
|
| PlanId |
string |
1898 |
|
| DynamicSql |
string |
false |
|
| ProcessSqlList |
array<object> |
||
|
object |
|||
| SqlText |
string |
select * from c1 where id = 100; |
|
| TenantId |
string |
t******** |
|
| Database |
string |
c3 |
|
| User |
string |
test_user |
|
| ExecuteTime |
integer |
5 |
|
| CpuTime |
integer |
1 |
|
| ServerIp |
string |
xx.xx.xx.xx |
|
| ClientIp |
string |
xx.xx.xx.xx |
|
| SessionId |
integer |
322441**** |
|
| ProxySessId |
string |
7521015416******** |
|
| Command |
string |
Query |
|
| Status |
string |
ACTIVE |
|
| SqlId |
string |
45CCBDC7DEBDCDAXXXXAFC******** |
|
| TraceId |
string |
YB420XXX128-00062XXXX8313XXX1-X-X |
|
| PlanId |
string |
1898 |
|
| DynamicSql |
string |
false |
|
| ServerSn |
string |
i-bp1*****sw64dhb***** |
|
| SessionStatistics |
object |
Statistik sesi yang dikelompokkan berdasarkan sumber berbeda. |
|
| UserStatistics |
array<object> |
The session data in the user dimension. |
|
|
object |
The session data in the user dimension. |
||
| MetricValue |
string |
The username. |
test_user |
| ActiveCount |
integer |
The number of active sessions. |
25 |
| TotalCount |
integer |
The total number of entries returned. |
30 |
| Type |
string |
The dimension. This value is fixed to user. |
user |
| SourceStatistics |
array<object> |
The session data in the client dimension. |
|
|
object |
The session data in the client dimension. |
||
| MetricValue |
string |
The IP address of the client. |
xx.xx.xx.xx |
| ActiveCount |
integer |
The number of active sessions. |
25 |
| TotalCount |
integer |
The total number of entries returned. |
30 |
| Type |
string |
The dimension. This value is fixed to client. |
client |
| DataBaseStatistics |
array<object> |
The session data in the database dimension. |
|
|
object |
The session data in the database dimension. |
||
| MetricValue |
string |
The name of the database. |
test_database |
| ActiveCount |
integer |
The number of active sessions. |
25 |
| TotalCount |
integer |
The total number of entries returned. |
30 |
| Type |
string |
The dimension. This value is fixed to database. |
database |
| ObVersion |
string |
Nomor versi OB. |
3.2.4 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "EE205C00-30E4-****-****-87E3A8A2AA0C",
"Data": {
"TotalSessionCount": 100,
"ActiveSessionCount": 60,
"IdleSessionCount": 30,
"AllProcessList": [
{
"SqlText": "select * from c1 where id = 100;",
"TenantId": "t********",
"Database": "c1",
"User": "test_user",
"ExecuteTime": 5,
"CpuTime": 1,
"ServerIp": "xx.xx.xx.xx",
"ClientIp": "xx.xx.xx.xx",
"SessionId": 0,
"ProxySessId": "7521015416********",
"Command": "Query",
"Status": "ACTIVE",
"SqlId": "45CCBDC7DEBDCDAXXXXAFC********",
"TraceId": "YB420XXX128-00062XXXX8313XXX1-X-X",
"PlanId": "1898",
"DynamicSql": "false",
"ProcessSqlLists": [
{
"SqlText": "select * from c1 where id = 100;",
"TenantId": "t********",
"Database": "c2",
"User": "test_user",
"ExecuteTime": 5,
"CpuTime": 1,
"ServerIp": "xx.xx.xx.xx",
"ClientIp": "xx.xx.xx.xx",
"SessionId": 0,
"ProxySessId": "7521015416********",
"Command": "Query",
"Status": "ACTIVE",
"SqlId": "45CCBDC7DEBDCDAXXXXAFC********",
"TraceId": "YB420XXX128-00062XXXX8313XXX1-X-X",
"PlanId": "1898",
"DynamicSql": "false",
"ProcessSqlList": [
{
"SqlText": "select * from c1 where id = 100;",
"TenantId": "t********",
"Database": "c3",
"User": "test_user",
"ExecuteTime": 5,
"CpuTime": 1,
"ServerIp": "xx.xx.xx.xx",
"ClientIp": "xx.xx.xx.xx",
"SessionId": 0,
"ProxySessId": "7521015416********",
"Command": "Query",
"Status": "ACTIVE",
"SqlId": "45CCBDC7DEBDCDAXXXXAFC********\n",
"TraceId": "YB420XXX128-00062XXXX8313XXX1-X-X",
"PlanId": "1898",
"DynamicSql": "false"
}
]
}
],
"ServerSn": "i-bp1*****sw64dhb*****"
}
],
"SessionStatistics": {
"UserStatistics": [
{
"MetricValue": "test_user",
"ActiveCount": 25,
"TotalCount": 30,
"Type": "user"
}
],
"SourceStatistics": [
{
"MetricValue": "xx.xx.xx.xx",
"ActiveCount": 25,
"TotalCount": 30,
"Type": "client"
}
],
"DataBaseStatistics": [
{
"MetricValue": "test_database",
"ActiveCount": 25,
"TotalCount": 30,
"Type": "database"
}
]
},
"ObVersion": "3.2.4"
}
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.