When performance issues or operation exceptions occur on a database, you can troubleshoot the issues or exceptions based on the session information about the database. The session management feature allows you to view the statistics about sessions between an instance and clients in real time. The statistics include the client information, commands that are run, and connection duration. You can also terminate abnormal sessions based on your business requirements.
Prerequisites
The database instance is connected to Data Autonomy Service (DAS) and is in the Normal Access state.
Limits
For Redis instances deployed in the cluster architecture, you cannot obtain the session information that is generated in direct connection mode.
Procedure
Log on to the DAS console.
In the left-side navigation pane, choose Intelligent O&M Center > Instance Monitoring.
On the page that appears, find the database instance that you want to manage and click the instance ID. The instance details page appears.
In the left-side pane, click Instance Sessions.
On the Instance Sessions tab, perform the following operations in the Instance Sessions and Session Statistics sections:
Terminate sessions.
View summary information and session statistics by access source. The summary information includes the total number of clients and the number of active clients.
Export summary information and session statistics by access source.
Parameters
In the Instance Sessions section, you can move the pointer over a parameter name in the corresponding column of the table to view the description of the parameter.
Parameter | Description | Parameter | Description |
id | The client ID. | sub | The number of subscribed channels. |
addr | The IP address and port number of the client. | psub | The number of subscribed patterns. |
name | The client name. | multi | The number of commands executed in the transaction. |
cmd | The most recently executed command. | qbuf | The size of the input buffer. |
age | The connection duration in seconds. | qbuf-free | The available 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 being connected to. | oll | The length of the object list in the dynamic output buffer. |
flags | The client flags can contain the following letters:
| omem | The size of the output buffer. |
fd | The file descriptor used by the socket. | events | The read/write readiness of the client socket in the event loop:
|
Related API operations
API operation | Description |
Queries the current sessions of a Redis instance. | |
Terminates all sessions of a Redis instance. |