{
  "id": "function-stats",
  "title": "FUNCTION STATS",
  "url": "https://redis.io/docs/latest/commands/function-stats/",
  "summary": "Returns information about a function during execution.",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-06-24T14:16:43-05:00",
  "page_type": "content",
  "content_hash": "8c98e4b6f5034bc74f39e097bd6b5aaa994d891e8a69fc1b209ddc4dc161a0f0",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Return information about the function that's currently running and information about the available execution engines.\n\nThe reply is map with two keys:\n\n1. `running_script`: information about the running script.\n  If there's no in-flight function, the server replies with a _nil_.\n  Otherwise, this is a map with the following keys:\n  * **name:** the name of the function.\n  * **command:** the command and arguments used for invoking the function.\n  * **duration_ms:** the function's runtime duration in milliseconds.\n2. `engines`: this is a map of maps. Each entry in the map represent a single engine.\n   Engine map contains statistics about the engine like number of functions and number of libraries.\n\nYou can use this command to inspect the invocation of a long-running function and decide whether kill it with the [`FUNCTION KILL`](https://redis.io/docs/latest/commands/function-kill) command.\n\nFor more information please refer to [Introduction to Redis Functions](https://redis.io/docs/latest/develop/programmability/functions-intro)."
    },
    {
      "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[Array reply](../../develop/reference/protocol-spec#arrays): information about the function that's currently running and information about the available execution engines.\n\n**RESP3:**\n\n[Map reply](../../develop/reference/protocol-spec#maps): information about the function that's currently running and information about the available execution engines."
    }
  ],
  "examples": []
}
