Instance sessions

更新时间:
复制 MD 格式

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

  1. Log on to the DAS console.

  2. In the navigation pane on the left, click Intelligent O&M Center > Instance Monitoring .

  3. Find the target instance and click the instance ID to open the instance details page.

  4. In the left-side pane, click Instance Sessions.

  5. 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

Note

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:

  • O: The client is a slave node in MONITOR mode.

  • S: The client is a slave node in normal mode.

  • M: The client is a master node.

  • x: The client is executing a transaction.

  • b: The client is waiting for a blocking event.

  • i: The client is waiting for a VM I/O operation (deprecated).

  • d: A watched key was modified. The EXEC command will fail.

  • c: The connection is closed after the reply is fully written.

  • u: The client is unblocked.

  • U: The client is connected through a Unix socket.

  • r: The client is a read-only node of a cluster.

  • A: The connection is closed as soon as possible.

  • N: No flags are set.

omem

The size of the output buffer.

fd

The file descriptor used by the socket.

events

The file descriptor events:

  • r: The client socket is readable in the event loop.

  • w: The client socket is writable in the event loop.

Related API operations

API

Description

GetRedisAllSession

Gets the current session data of a Redis instance.

KillInstanceAllSession

Terminates all sessions on a specified Redis instance.