Difference between revisions of "Redis-cli"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
Line 13: Line 13:
  
  
[[redis-cli dbsize]]
+
* <code>[[redis-cli dbsize]]</code>
[[redis-cli flushall]]
+
* <code>[[redis-cli flushall]]</code>
[[redis-cli ping]]
+
* <code>[[redis-cli ping]]</code>
[[redis-cli monitor]]
+
* <code>[[redis-cli monitor]]</code>
[[redis-cli --bigkeys]]
+
* <code>[[redis-cli --bigkeys]]</code>
[[redis-cli --stat]]
+
* <code>[[redis-cli --stat]]</code>
[[redis-cli --scan]]
+
* <code>[[redis-cli --scan]]</code>
  
[[redis-cli config set requirepass]]
+
* <code>[[redis-cli config set requirepass]]</code>
  
[[redis-cli --latency]]
+
* <code>[[redis-cli --latency]]</code>
[[redis-cli --latency-history]]
+
* <code>[[redis-cli --latency-history]]</code>
[[redis-cli --latency-dist]]
+
* <code>[[redis-cli --latency-dist]]</code>
[[redis-cli latency doctor]]
+
* <code>[[redis-cli latency doctor]]</code>
[[redis-cli --intrinsic-latency 5]]
+
* <code>[[redis-cli --intrinsic-latency 5]]</code>
  
 
===[[Backups]]===
 
===[[Backups]]===

Revision as of 07:41, 9 March 2023

https://redis.io/docs/manual/cli/

brew install redis-cli
redis-cli --help
redis-cli -h you-redis-server
redis-cli --version
redis-cli info server

memory Redis memory footprint: redis-cli info memory, redis-cli memory stats, redis-cli memory doctor, redis-cli memory usage


Backups

redis-cli --rdb /tmp/dump.rdb
redis-cli LPUSH mylist a b c d
(integer) 4
redis-cli --csv LRANGE mylist 0 -1
"d","c","b","a"
redis-cli INCR mycounter
(integer) 1
redis-cli INCR mycounter
(integer) 2
redis-cli --raw INCR mycounter
3


redis-cli -x SET net_services < /etc/services


Errors

redis-cli
Could not connect to Redis at 127.0.0.1:6379: Connection refused

Solution: brew install redis && brew services restart redis

Related

redis-client

See also

Advertising: