{
  "schema_version": 2,
  "id": "commands/monitor",
  "title": "MONITOR",
  "url": "https://redis.io/docs/latest/commands/monitor/",
  "summary": "Listens for all requests received by the server in real-time.",
  "since": "1.0.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-09-18T09:48:09+01:00",
  "page_type": "content",
  "content_hash": "3c31e9928b5dcde5009f0ca58b2d049a0de692cc01f01512224c3fbde6f4efb0",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "`MONITOR` is a debugging command that streams back every command processed by\nthe Redis server.\nIt can help in understanding what is happening to the database.\nThis command can both be used via `redis-cli` and via `telnet`.\n\nThe ability to see all the requests processed by the server is useful in order\nto spot bugs in an application both when using Redis as a database and as a\ndistributed caching system.\n\n[code example]\n\nUse `SIGINT` (Ctrl-C) to stop a `MONITOR` stream running via `redis-cli`.\n\n[code example]\n\nManually issue the [`QUIT`](https://redis.io/docs/latest/commands/quit) or [`RESET`](https://redis.io/docs/latest/commands/reset) commands to stop a `MONITOR` stream running\nvia `telnet`."
    },
    {
      "id": "commands-not-logged-by-monitor",
      "title": "Commands not logged by MONITOR",
      "role": "syntax",
      "text": "Because of security concerns, no administrative commands are logged\nby `MONITOR`'s output and sensitive data is redacted in the command [`AUTH`](https://redis.io/docs/latest/commands/auth).\n\nFurthermore, the command [`QUIT`](https://redis.io/docs/latest/commands/quit) is also not logged."
    },
    {
      "id": "cost-of-running-monitor",
      "title": "Cost of running MONITOR",
      "role": "content",
      "text": "Because `MONITOR` streams back **all** commands, its use comes at a cost.\nThe following (totally unscientific) benchmark numbers illustrate what the cost\nof running `MONITOR` can be.\n\nBenchmark result **without** `MONITOR` running:\n\n[code example]\n\nBenchmark result **with** `MONITOR` running (`redis-cli monitor > /dev/null`):\n\n[code example]\n\nIn this particular case, running a single `MONITOR` client can reduce the\nthroughput by more than 50%.\nRunning more `MONITOR` clients will reduce throughput even more."
    },
    {
      "id": "behavior-change-history",
      "title": "Behavior change history",
      "role": "content",
      "text": "*   `>= 6.0.0`: [`AUTH`](https://redis.io/docs/latest/commands/auth) excluded from the command's output.\n*   `>= 6.2.0`: \"[`RESET`](https://redis.io/docs/latest/commands/reset) can be called to exit monitor mode.\n*   `>= 6.2.4`: \"[`AUTH`](https://redis.io/docs/latest/commands/auth), [`HELLO`](https://redis.io/docs/latest/commands/hello), [`EVAL`](https://redis.io/docs/latest/commands/eval), [`EVAL_RO`](https://redis.io/docs/latest/commands/eval_ro), [`EVALSHA`](https://redis.io/docs/latest/commands/evalsha) and [`EVALSHA_RO`](https://redis.io/docs/latest/commands/evalsha_ro) included in the command's output."
    },
    {
      "id": "redis-software-and-redis-cloud-compatibility",
      "title": "Redis Software and Redis Cloud compatibility",
      "role": "content",
      "text": "| Redis<br />Software | Redis<br />Cloud | <span style=\"min-width: 9em; display: table-cell\">Notes</span> |\n|:----------------------|:-----------------|:------|\n| <span title=\"Supported\">&#x2705; Standard</span><br /><span title=\"Supported\"><nobr>&#x2705; Active-Active</nobr></span> | <span title=\"Supported\">&#x2705; Standard</span><br /><span title=\"Supported\"><nobr>&#x2705; Active-Active</nobr></span> |  |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\n**Non-standard return value**. Dumps the received commands in an infinite flow.\n\n**RESP3:**\n\n**Non-standard return value**. Dumps the received commands in an infinite flow."
    }
  ],
  "examples": [
    {
      "id": "overview-ex0",
      "language": "plaintext",
      "code": "$ redis-cli monitor\n1339518083.107412 [0 127.0.0.1:60866] \"keys\" \"*\"\n1339518087.877697 [0 127.0.0.1:60866] \"dbsize\"\n1339518090.420270 [0 127.0.0.1:60866] \"set\" \"x\" \"6\"\n1339518096.506257 [0 127.0.0.1:60866] \"get\" \"x\"\n1339518099.363765 [0 127.0.0.1:60866] \"eval\" \"return redis.call('set','x','7')\" \"0\"\n1339518100.363799 [0 lua] \"set\" \"x\" \"7\"\n1339518100.544926 [0 127.0.0.1:60866] \"del\" \"x\"",
      "section_id": "overview"
    },
    {
      "id": "overview-ex1",
      "language": "plaintext",
      "code": "$ telnet localhost 6379\nTrying 127.0.0.1...\nConnected to localhost.\nEscape character is '^]'.\nMONITOR\n+OK\n+1339518083.107412 [0 127.0.0.1:60866] \"keys\" \"*\"\n+1339518087.877697 [0 127.0.0.1:60866] \"dbsize\"\n+1339518090.420270 [0 127.0.0.1:60866] \"set\" \"x\" \"6\"\n+1339518096.506257 [0 127.0.0.1:60866] \"get\" \"x\"\n+1339518099.363765 [0 127.0.0.1:60866] \"del\" \"x\"\n+1339518100.544926 [0 127.0.0.1:60866] \"get\" \"x\"\nQUIT\n+OK\nConnection closed by foreign host.",
      "section_id": "overview"
    },
    {
      "id": "cost-of-running-monitor-ex0",
      "language": "plaintext",
      "code": "$ src/redis-benchmark -c 10 -n 100000 -q\nPING_INLINE: 101936.80 requests per second\nPING_BULK: 102880.66 requests per second\nSET: 95419.85 requests per second\nGET: 104275.29 requests per second\nINCR: 93283.58 requests per second",
      "section_id": "cost-of-running-monitor"
    },
    {
      "id": "cost-of-running-monitor-ex1",
      "language": "plaintext",
      "code": "$ src/redis-benchmark -c 10 -n 100000 -q\nPING_INLINE: 58479.53 requests per second\nPING_BULK: 59136.61 requests per second\nSET: 41823.50 requests per second\nGET: 45330.91 requests per second\nINCR: 41771.09 requests per second",
      "section_id": "cost-of-running-monitor"
    }
  ]
}
