Questions tagged [redis-cli]

redis-cli is the command line interface that is installed when installing Redis.

redis-cli 3.0.5

Usage: redis-cli [OPTIONS] [cmd [arg [arg ...]]]
  -h <hostname>      Server hostname (default: 127.0.0.1).
  -p <port>          Server port (default: 6379).
  -s <socket>        Server socket (overrides hostname and port).
  -a <password>      Password to use when connecting to the server.
  -r <repeat>        Execute specified command N times.
  -i <interval>      When -r is used, waits <interval> seconds per command.
                     It is possible to specify sub-second times like -i 0.1.
  -n <db>            Database number.
  -x                 Read last argument from STDIN.
  -d <delimiter>     Multi-bulk delimiter in for raw formatting (default: \n).
  -c                 Enable cluster mode (follow -ASK and -MOVED redirections).
  --raw              Use raw formatting for replies (default when STDOUT is
                     not a tty).
  --no-raw           Force formatted output even when STDOUT is not a tty.
  --csv              Output in CSV format.
  --stat             Print rolling stats about server: mem, clients, ...
  --latency          Enter a special mode continuously sampling latency.
  --latency-history  Like --latency but tracking latency changes over time.
                     Default time interval is 15 sec. Change it using -i.
  --latency-dist     Shows latency as a spectrum, requires xterm 256 colors.
                     Default time interval is 1 sec. Change it using -i.

  --lru-test <keys>  Simulate a cache workload with an 80-20 distribution.

  --slave            Simulate a slave showing commands received from the master.
  --rdb <filename>   Transfer an RDB dump from remote server to local file.
  --pipe             Transfer raw Redis protocol from stdin to server.
  --pipe-timeout <n> In --pipe mode, abort with error if after sending all data.
                     no reply is received within <n> seconds.
                     Default timeout: 30. Use 0 to wait forever.
  --bigkeys          Sample Redis keys looking for big keys.
  --scan             List all keys using the SCAN command.
  --pattern <pat>    Useful with --scan to specify a SCAN pattern.
  --intrinsic-latency <sec> Run a test to measure intrinsic system latency.
                     The test will run for the specified amount of seconds.
  --eval <file>      Send an EVAL command using the Lua script at <file>.
  --help             Output this help and exit.
  --version          Output version and exit.

Examples:
  cat /etc/passwd | redis-cli -x set mypasswd
  redis-cli get mypasswd
  redis-cli -r 100 lpush mylist x
  redis-cli -r 100 -i 1 info | grep used_memory_human:
  redis-cli --eval myscript.lua key1 key2 , arg1 arg2 arg3
  redis-cli --scan --pattern '*:12345*'

  (Note: when using --eval the comma separates KEYS[] from ARGV[] items)

When no command is given, redis-cli starts in interactive mode.
Type "help" in interactive mode for information on available commands.
278 questions
-1
votes
1 answer

redis-cli "Error: Server closed the connection" when requesting lots of keys

for some reason running command KEYS command on result with millions of keys result in Error: Server closed the connection. [nir]$ echo "keys abc" | redis-cli -h $redis 1) "abc" [nir]$ echo "keys a*"| redis-cli -h $redis Error: Server closed the…
Nir
  • 2,497
  • 9
  • 42
  • 71
-1
votes
1 answer

REDIS: What does the number in the cluster_enabled mean? Is 0 true or is 1 true?

When you enter INFO in redis-cli, you get a field called cluster_enabled. It is set to 0 for me. Does this mean that cluster mode is enabled or not? I know this is basic but suprisingly the documentation just says cluster_enabled: Indicate Redis…
suleydaman
  • 463
  • 1
  • 7
  • 18
-1
votes
1 answer

Single Object having 2GB size(may be it more in future) to store in Redis Cache

we are planning to implement distributed Cache(Redis Cache) for our application. We have a data and stored it in map with having size around 2GB and it is a single object. Currently it is storing in Context scope similarly we have plenty of objects…
Manohar
  • 19
  • 6
-1
votes
1 answer

Getting performance issue while retrieving data from REDIS CACHE in JAVA

I am having the 250MB data storing into redis Cache as a single hash object. I am using Spring RedisTemplate to read data from redis. But it's taking the the around 30 to 35 secs of time. redisTemplate.opsForHash().put("masterMap","masterMap",…
Manohar
  • 19
  • 6
-1
votes
1 answer

If the slave does not yet have a master key, Is the Redis cluster redirected to the master? in CLIENT CLUSTER && READONLY mode

I just wondering this context. In Redis Cluster, redis-cli(start cluster mode, like redis-cli -c ) request key to slave that redis-cli connection with redis in READONLY mode. If the slave have not key of master key (this means not yet sync), Then…
b_dobee
  • 19
  • 1
  • 9
-1
votes
1 answer

Waiting for the cluster to join.... never ends redis-trib.rb Redis 3.2.9

Trying to create Redis Cluster between 3 nodes on 3 three different servers connected over LAN. Tried both - src/redis-trib.rb create 192.168.148.20:6379 192.168.131.213:6379 192.168.142.199:6379 - src/redis-trib.rb create 192.168.148.20:7000…
DKDevOps
  • 7
  • 3
-1
votes
1 answer

redis-cli not working if port is changed

I am using redis 2.4 . When I change the port in "redis.conf" file to another port redis-cli stops working. It shows Could not connect to Redis at 127.0.0.1:6379: Unknown error not connected>
user6542291
  • 29
  • 1
  • 6
-2
votes
2 answers

how to get list of hashes in redis db using java?

Is there any way to achieve and implemen this using java program. Currently I am referring Redis website.
sathya
  • 199
  • 5
  • 26
1 2 3
18
19