Redis Client List Command | Newbie Tutorial
Newbie Tutorial -- Learning Technology, More Than Just Dreams!
- Home
- HTML
- JavaScript
- CSS
- Vue
- React
- Python3
- Java
- C
- C++
- C#
- AI
- Go
- SQL
- Linux
- VS Code
- Bootstrap
- Git
- Local Bookmarks
Redis Tutorial
Redis TutorialRedis IntroductionRedis InstallationRedis ConfigurationRedis Data Types
Redis Commands
Redis CommandsRedis KeysRedis StringsRedis HashesRedis ListsRedis SetsRedis Sorted SetsRedis HyperLogLogRedis Publish SubscribeRedis TransactionsRedis ScriptingRedis ConnectionRedis ServerRedis GEORedis Stream
Redis Advanced Tutorials
Redis Data Backup and RecoveryRedis SecurityRedis Performance TestingRedis Client ConnectionRedis PipeliningRedis PartitioningJava Using RedisPHP Using Redis
Deep Exploration
Network
Computer Server
Data Management
Programming
Network Services
Network Design and Development
Development Tools
Programming Languages
Web Service
Script
Redis Client List Command
The Redis Client List command is used to return information and statistics about all clients connected to the server.
Syntax
The basic syntax of the redis Client List command is as follows:
redis 127.0.0.1:6379> CLIENT LIST
Available Version
>= 2.4.0
Return Value
The command returns a multi-line string formatted as follows:
- Each connected client corresponds to one line (separated by LF)
- Each line consists of a series of fields in the form attribute=value, separated by spaces
The following are the meanings of the fields:
- addr: The address and port of the client
- fd: File descriptor used by the socket
- age: Connection duration in seconds
- idle: Idle time in seconds
- flags: Client flags
- db: Database ID currently used by the client
- sub: Number of subscribed channels
- psub: Number of subscribed patterns
- multi: Number of commands being executed in transaction
- qbuf: Length of query buffer (in bytes, 0 means no query buffer allocated)
- qbuf-free: Length of remaining space in query buffer (in bytes, 0 means no remaining space)
- obl: Length of output buffer (in bytes, 0 means no output buffer allocated)
- oll: Number of objects contained in output list (when the output buffer has no remaining space, command replies will be queued to this queue as string objects)
- omem: Total memory occupied by output buffer and output list
- events: File descriptor events
- cmd: Most recently executed command
Client flags can consist of the following parts:
- O: Client is a slave node in MONITOR mode
- S: Client is a slave node in normal mode
- M: Client is a master node
- x: Client is executing a transaction
- b: Client is waiting for blocking events
- i: Client is waiting for VM I/O operations (deprecated)
- d: A watched key has been modified, EXEC command will fail
- c: Close connection after completely writing the response
- u
YouTip