CLIENT LIST

Since 1.1.0Server

Syntax

CLIENT LIST [TYPE normal|master|replica|pubsub] [ID id [id ...]] [USER username] [ADDR ip:port] [LADDR ip:port] [SKIPME yes|no] [MAXAGE seconds]

Returns a line per connection, with Redis's fields: id, addr, laddr, name, age, idle, flags, db, sub, psub, ssub, multi, watch, cmd, user, redir, resp, lib-name, lib-ver and others. The options keep only the connections that match.

OptionKeeps
TYPE normal | master | replica | pubsubconnections of this kind
ID id ...these IDs
USER usernameconnections logged in as this user
ADDR ip:port, LADDR ip:portthe client's address, or the server's
SKIPME yes | nowhether to leave this connection out
MAXAGE secondsconnections at most this old

flags is N for an ordinary client, S on a master for a replica's replication link, M on a replica for its link to its master, b for a client blocked in a command such as BLPOP or WAIT, P for a Pub/Sub subscriber, and e with CLIENT NO-EVICT on. laddr is the address the client connected to. The replication links show as S and M since 1.2.1, so that TYPE replica and TYPE master find them; in 1.2.0 they showed as N. e, and b for every blocked client, are since 1.2.1 too.