When a database experiences performance issues or abnormal operations, you can check its session information to quickly identify and resolve these problems. The instance session feature lets you view real-time information for sessions on a target instance, such as client information, executed commands, and connection duration. You can also terminate abnormal sessions as needed.
Prerequisites
The target database instance must be connected to Database Autonomy Service (DAS), and its accessed state must be Normal Access.
Limitations
For Redis cluster instances, you cannot retrieve sessions that are created in direct connection mode.
Procedure
Log on to the DAS console.
In the navigation pane on the left, click .
Find the target instance and click the instance ID to open the instance details page.
In the left-side pane, click Instance Sessions.
On the Instance Sessions page, you can manage the current sessions of the instance in the Instance Sessions and Session Statistics sections:
Terminate sessions.
View session statistics: View a session summary that includes the total number of clients and the number of active clients. You can also view the total and active session counts grouped by source.
Export session statistics based on criteria such as the summary and statistics by source.
Parameters
You can also hover over a parameter name in its corresponding column in the Instance Sessions table to view its description.
Parameter | Description | Parameter | Description |
id | The client ID. | sub | The number of subscribed channels. |
addr | The address and port of the client. | psub | The number of subscribed patterns. |
name | The client name. | multi | The number of commands to be executed in a transaction. |
cmd | The last executed command. | qbuf | The size of the input buffer. |
age | The connection duration in seconds. | qbuf-free | The remaining size of the input buffer. |
idle | The idle time in seconds. | obl | The size of the fixed output buffer. |
db | The database that the client is using. | oll | The length of the object list in the dynamic output buffer. |
flags | The client flags can include the following:
| omem | The size of the output buffer. |
fd | The file descriptor used by the socket. | events | The file descriptor events:
|
Related API operations
API | Description |
Gets the current session data of a Redis instance. | |
Terminates all sessions on a specified Redis instance. |