diff options
Diffstat (limited to '')
-rw-r--r-- | iredis/data/commands/monitor.md | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/iredis/data/commands/monitor.md b/iredis/data/commands/monitor.md index 28cbeef..2622cdd 100644 --- a/iredis/data/commands/monitor.md +++ b/iredis/data/commands/monitor.md @@ -1,6 +1,7 @@ `MONITOR` is a debugging command that streams back every command processed by -the Redis server. It can help in understanding what is happening to the -database. This command can both be used via `redis-cli` and via `telnet`. +the Redis server. +It can help in understanding what is happening to the database. +This command can both be used via `redis-cli` and via `telnet`. The ability to see all the requests processed by the server is useful in order to spot bugs in an application both when using Redis as a database and as a @@ -12,8 +13,9 @@ $ redis-cli monitor 1339518087.877697 [0 127.0.0.1:60866] "dbsize" 1339518090.420270 [0 127.0.0.1:60866] "set" "x" "6" 1339518096.506257 [0 127.0.0.1:60866] "get" "x" -1339518099.363765 [0 127.0.0.1:60866] "del" "x" -1339518100.544926 [0 127.0.0.1:60866] "get" "x" +1339518099.363765 [0 127.0.0.1:60866] "eval" "return redis.call('set','x','7')" "0" +1339518100.363799 [0 lua] "set" "x" "7" +1339518100.544926 [0 127.0.0.1:60866] "del" "x" ``` Use `SIGINT` (Ctrl-C) to stop a `MONITOR` stream running via `redis-cli`. @@ -41,21 +43,16 @@ via `telnet`. ## Commands not logged by MONITOR -Because of security concerns, all administrative commands are not logged by -`MONITOR`'s output. +Because of security concerns, no administrative commands are logged +by `MONITOR`'s output and sensitive data is redacted in the command `AUTH`. -Furthermore, the following commands are also not logged: - -- `AUTH` -- `EXEC` -- `HELLO` -- `QUIT` +Furthermore, the command `QUIT` is also not logged. ## Cost of running MONITOR -Because `MONITOR` streams back **all** commands, its use comes at a cost. The -following (totally unscientific) benchmark numbers illustrate what the cost of -running `MONITOR` can be. +Because `MONITOR` streams back **all** commands, its use comes at a cost. +The following (totally unscientific) benchmark numbers illustrate what the cost +of running `MONITOR` can be. Benchmark result **without** `MONITOR` running: @@ -80,15 +77,16 @@ INCR: 41771.09 requests per second ``` In this particular case, running a single `MONITOR` client can reduce the -throughput by more than 50%. Running more `MONITOR` clients will reduce -throughput even more. +throughput by more than 50%. +Running more `MONITOR` clients will reduce throughput even more. @return **Non standard return value**, just dumps the received commands in an infinite flow. -@history +## Behavior change history -- `>= 6.2`: `RESET` can be called to exit monitor mode. -- `>= 6.0`: `AUTH` excluded from the command's output. +* `>= 6.0.0`: `AUTH` excluded from the command's output. +* `>= 6.2.0`: "`RESET` can be called to exit monitor mode. +* `>= 6.2.4`: "`AUTH`, `HELLO`, `EVAL`, `EVAL_RO`, `EVALSHA` and `EVALSHA_RO` included in the command's output.
\ No newline at end of file |