Redis "Customer List" Purpose and Description

Performing the "Client List", I get the following result: what each flag means

Slave addr = 100.0.0.0: 0000 fd = 5 idle = 3 flags = S db = 0 sub = 0 psub = 0 qbuf = 0 obl = 0 oll = 0 events = r cmd = sync

Wizard addr = 100.0.0.0: 0000 fd = 6 idle = 0 flags = N db = 0 sub = 0 psub = 0 qbuf = 0 obl = 0 oll = 0 events = r cmd = client

+2
source share
1 answer

In the client list, Redis prints one line for each connected client. From the redis.h and network.c files of the Redis source code:

  • addr: client address / port
  • fd: file descriptor matching socket
  • idle: connection idle time in seconds
  • flags: client flags (see below)
  • db: current database id
  • sub: number of channel subscribers
  • psub: number of signatures matching the pattern
  • qbuf: request buffer length (0 means the request is not expected)
  • obl: output buffer length
  • oll: length of the output list (responses are queued in this list when the buffer is full)
  • events: file descriptor events (see below)
  • cmd: last command played

Customer flags can be a combination of:

  • O: the client is a slave in MONITOR mode.
  • S: the client is a regular slave server
  • M: the client is a master
  • x: client is in MULTI / EXEC context
  • b: client is waiting in a lock operation
  • i: client is waiting for VM I / O
  • d: changed watched keys have been changed - EXEC will fail
  • c: the connection will be closed after writing the full answer
  • u: client is unlocked
  • N: no specific set of flags

File descriptor events can be:

  • r: client socket readable (event loop)
  • w: client socket is writable (event loop)

This is my interpretation, please take it with salt.

+4
source

Source: https://habr.com/ru/post/921360/


All Articles