From 8187989f01b65ecd2102ac13181589f8f5e70c6e Mon Sep 17 00:00:00 2001 From: timo Date: Sat, 6 May 2017 15:40:42 +0200 Subject: [PATCH] Added commands to redis chapter --- docs/redis.md | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/docs/redis.md b/docs/redis.md index ef1b137ae..06665247c 100644 --- a/docs/redis.md +++ b/docs/redis.md @@ -8,15 +8,29 @@ To connect to the redis cli execute: docker-compose exec redis-mailcow redis-cli ``` -Here are some usefull commands for debugging: +Here are some usefull commands for the redis-cli for debugging: -!!! info - - **monitor**: Listens for all requests received by the server in real time. - ``` - # docker-compose exec redis-mailcow redis-cli - 127.0.0.1:6379> monitor - OK - 1494077286.401963 [0 172.22.1.253:41228] "SMEMBERS" "BAYES_SPAM_keys" - 1494077288.292970 [0 172.22.1.253:41229] "SMEMBERS" "BAYES_SPAM_keys" - [...] - ``` +**monitor**: Listens for all requests received by the server in real time: +``` +# docker-compose exec redis-mailcow redis-cli +127.0.0.1:6379> monitor +OK +1494077286.401963 [0 172.22.1.253:41228] "SMEMBERS" "BAYES_SPAM_keys" +1494077288.292970 [0 172.22.1.253:41229] "SMEMBERS" "BAYES_SPAM_keys" +[...] +``` + +**keys**: Get all keys matching your pattern: + +``` + +``` + +**ping**: Test a connection + +``` +127.0.0.1:6379> PING +PONG +``` + +If you want to know more, here is a [cheat sheet](https://www.cheatography.com/tasjaevan/cheat-sheets/redis/).