A redis INFO: -ERR The wrong number of arguments for the info command

so I just ran the INFO command as described here http://redis.io/commands/info

but it only gives me default sections - for example, processor information and others

and when I try to add a parameter [section]- it goes wrong:

telnet 127.0.0.1 6379
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.

INFO keyspace
-ERR wrong number of arguments for 'info' command

INFO all
-ERR wrong number of arguments for 'info' command

so how can i get the keypace section of the INFO command?

+3
source share
2 answers

It happens that info sectiondoes not work in versions of redis <2.6.

So, I end up using a simple one infowithout the section parameter, although it will not give you all.

+2
source

No problems here do [section] via telnet or redis-cli:

$ telnet localhost 6379
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
info keyspace
$34
# Keyspace
db0:keys=5,expires=0

quit
+OK
Connection closed by foreign host.
$ redis-cli
redis 127.0.0.1:6379> info keyspace
# Keyspace
db0:keys=5,expires=0
redis 127.0.0.1:6379> quit
$ redis-server --version
Redis server v=2.6.13 sha=00000000:0 malloc=jemalloc-3.3.1 bits=64

What version of Redis are you using?

+1
source

All Articles