w3resource

Redis Server: COMMAND INFO

Redis COMMAND INFO Command

Redis COMMAND INFO is used to return details about multiple redis commands in array form.

Here are some common uses and scenarios for the "COMMAND INFO" command:

  • Detailed Command Info: Retrieves detailed information about one or more specific Redis commands, including their arity, flags, and key patterns.
  • Command Behavior: Helps in understanding the behavior and requirements of individual commands.
  • Debugging and Optimization: Assists in debugging and optimizing commands by providing insights into their execution characteristics.
  • Feature Discovery: Aids in discovering the features and capabilities of Redis commands, such as whether they are read-only or transactional.

Syntax:

COMMAND INFO command-name [command-name ...] 

Available since

2.8.13.

Return Value

Array reply nested list of command details.

Return Value Type

Array

Example: Redis COMMAND INFO

redis 127.0.0.1:6379> COMMAND INFO get set eval 
1) 1) "get"
   2) (integer) 2
   3) 1) readonly
      2) fast
   4) (integer) 1
   5) (integer) 1
   6) (integer) 1
2) 1) "set"
   2) (integer) -3
   3) 1) write
      2) denyoom
   4) (integer) 1
   5) (integer) 1
   6) (integer) 1
3) 1) "eval"
   2) (integer) -3
   3) 1) noscript
      2) movablekeys
   4) (integer) 0
   5) (integer) 0
   6) (integer) 0
redis> COMMAND INFO foo evalsha config bar
1) (nil)
2) 1) "evalsha"
   2) (integer) -3
   3) 1) noscript
      2) movablekeys
   4) (integer) 0
   5) (integer) 0
   6) (integer) 0
3) 1) "config"
   2) (integer) -2
   3) 1) readonly
      2) admin
      3) stale
   4) (integer) 0
   5) (integer) 0
   6) (integer) 0
4) (nil)

Previous: COMMAND GETKEYS
Next: CONFIG GET



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://www.w3resource.com/redis/redis-server-command-info-command-name.php