website/docs/commands/client.md
CLIENT ID
The command just returns the ID of the current connection. Every connection ID has certain guarantees:
Integer reply: the ID of the client.
CLIENT INFO
The command returns information and statistics about the current client connection in a mostly human readable format.
Bulk string reply: a unique string for the current client, as described at the CLIENT LIST page.
CLIENT GETNAME
The command returns the name of the current connection as set by CLIENT SETNAME.
Bulk string reply: the name of the client, or an empty string if no name is set.
CLIENT SETNAME <name>
The command sets the name of the current connection.
Simple string reply: OK if the connection name was successfully set.
CLIENT SETINFO <LIB-NAME libname | LIB-VER libver>
The command sets the value of a specific section of the current client connection.
Currently the supported attributes are:
Simple string reply: OK if the section value was successfully set.
CLIENT KILL <ip:port | <[ID client-id] | [TYPE <NORMAL | MASTER |
SLAVE | REPLICA | PUBSUB>] | [USER username] | [ADDR ip:port] |
[LADDR ip:port] | [SKIPME <YES | NO>] | [MAXAGE maxage]
[[ID client-id] | [TYPE <NORMAL | MASTER | SLAVE | REPLICA |
PUBSUB>] | [USER username] | [ADDR ip:port] | [LADDR ip:port] |
[SKIPME <YES | NO>] | [MAXAGE maxage] ...]>>
The CLIENT KILL command closes a given client connection.
One of the following:
CLIENT LIST [TYPE <NORMAL | MASTER | REPLICA | PUBSUB>]
[ID client-id [client-id ...]]
The CLIENT LIST command returns information and statistics about the client connections server in a mostly human readable format.
You can use one of the optional subcommands to filter the list. The TYPE type subcommand filters the list by clients' type, where type is one of normal, master, replica, and pubsub.
Bulk string reply: information and statistics about client connections.
CLIENT UNBLOCK <client-id> [TIMEOUT | ERROR]
The command unblocks a client blocked by a blocking command such as BRPOP, XREAD, or BLPOP.
The optional argument specifies how to unblock the client:
Integer reply: