On an unfamiliar production Redis instance, what does the INFO command report, and which sections would you read first?
answer
- one command, many named sections
- field:value lines under # headers
- what is it, and which role
- plain INFO means the default set
- per-command statistics need asking for
basics
~10 sINFO returns one server's state and counters as field:value lines grouped into sections. Read server, replication, clients and stats first for version, role, load and refusals; plain INFO omits commandstats, so name it.
solid answer
~40 s`INFO` reports the state and counters of the one server `redis-cli` is connected to, as `field:value` lines under `#` section headers. With no argument it returns the `default` set, and you can name sections, as in `INFO server replication clients stats`. On an instance I don't know, I start with `server` for `redis_version`, `redis_mode` and `uptime_in_seconds`, then `replication` for `role`, because whether a node is a primary or a replica changes how I read everything else. Next comes `clients` for `connected_clients` against `maxclients`, and `stats` for `instantaneous_ops_per_sec`, `rejected_connections` and `total_error_replies`. `persistence` and `keyspace` show what is being saved and how many keys exist. `commandstats` and `latencystats` are not in the default set, so I ask for them by name. All of this describes what the server is doing now, not what it could handle.
code
bash · 3 linesredis-cli INFO server replication clients stats
redis-cli INFO persistence keyspace
redis-cli INFO commandstatsgo deeper
Recall that INFO returns named sections of field:value lines, that you can name the sections you want, and that server, replication, clients and stats are a sensible first read.
Explain what the default set leaves out, how all and everything differ, and why cumulative counters need two readings before they mean anything as a rate.
Show a triage order driven by questions: role before load, refusals before tuning. Say plainly what INFO cannot tell you, and which tool you move to when you need per-client or per-command detail.
Treat INFO as the raw feed for a team's standing runbook: agree which fields every on-call engineer reads first, how they are collected across upgrades, and that current load is never quoted as capacity.
## What INFO is `INFO` is the Redis command that reports a server's state and counters. Its reply is text meant for both people and scripts: **section headers** that start with `#`, and **properties** written as `field:value`, one per line. Some values are small comma-separated maps, such as the `db0` line in `keyspace`, which carries `keys`, `expires`, `avg_ttl` and `subexpiry`. You can pass one section or, since Redis 7.0, several: `INFO clients stats`. With `redis-cli`, the answer describes the single node you reached. In a Redis Cluster, ask each node you care about. ## Which sections to read first The order below answers the questions a new on-call engineer has, from "what is this thing" to "is it under strain": 1. **`server`**: what it is and how long it has been up. 2. **`replication`**: whether it is a primary or a replica. 3. **`clients`**: how many connections it holds and how close that is to the limit. 4. **`stats`**: current load and what it has been refusing. 5. **`persistence`** and **`keyspace`**: what it saves and how much it stores. | Section | Fields to read first | What they answer | |---|---|---| | `server` | `redis_version`, `redis_mode`, `uptime_in_seconds`, `config_file` | Which release, standalone or cluster, recent restart, where the settings live | | `replication` | `role`, `connected_slaves`, `master_link_status` | Primary or replica, how many replicas, whether a replica's link is up | | `clients` | `connected_clients`, `maxclients`, `blocked_clients` | Connection count against the limit, clients stuck in a blocking call | | `stats` | `instantaneous_ops_per_sec`, `rejected_connections`, `total_error_replies` | Commands per second, connections refused at `maxclients`, error replies issued | | `persistence` | `aof_enabled`, `rdb_last_bgsave_status`, `rdb_last_save_time` | Whether anything is being written to disk and whether the last save worked | | `keyspace` | `db0` and its `keys`, `expires` | How many keys, and how many carry a deadline | Two fields are easy to confuse. `redis_mode` says `standalone`, `sentinel` or `cluster`; it does not say primary or replica. `role` does, and for protocol reasons it still uses the words `master` and `slave`. The `memory` section is also in the default set, but interpreting its figures is a subject of its own and comes after this first pass. ## What plain INFO leaves out In Redis 8.10 the `default` set is `server`, `clients`, `memory`, `persistence`, `stats`, `replication`, `threads`, `cpu`, `hotkeys`, the module list, `errorstats`, `cluster`, `keyspace` and `keysizes`. So: - **`commandstats`** and **`latencystats`** are not returned unless you name them or use `all`. - **`all`** returns every section except the fields modules generate. - **`everything`** returns `all` plus those module fields. - **`modules`** asks for the module-generated fields directly. - **`debug`** holds experimental metrics and comes back only when asked for by name. ## Reading the numbers honestly A single reading gives you state, not a trend, and INFO mixes three kinds of number: - **Gauges**, such as `connected_clients`, are true at the moment you read them. - **Cumulative counters**, such as `total_commands_processed` and `rejected_connections`, count since the server started or since the last `CONFIG RESETSTAT`. A rate needs two readings and a subtraction. - **Short-window rates**: `instantaneous_ops_per_sec` is the mean of 16 samples taken every 100 ms, so it covers under two seconds and can miss a burst from a minute ago. Scripts should look up fields by name, skip what they do not know and tolerate what is missing, because the docs warn that fields are added and removed between versions. Polling is modest in cost: Redis's benchmarking guide says using `INFO` at a regular interval is "probably fine", in the same line where it warns that `MONITOR` will distort a measurement. ## What INFO cannot tell you INFO answers "what is happening", not "what could happen". If someone asks an on-call engineer what load this instance can take before a launch, `instantaneous_ops_per_sec` is today's traffic, not a ceiling. It also says nothing per key or per client: it can show that errors are rising, but not who is sending the bad commands. For that you move to `CLIENT LIST` and the per-command sections. A practical habit follows from all this. Save the output of your first pass to a file with a timestamp, because the next reading only means something next to an earlier one. That also gives whoever takes over from you a baseline to compare against.
- Why should a script parse INFO by field name rather than by line position?The Redis docs warn that fields are added or removed depending on the version, and tell clients to skip unknown properties and handle missing ones gracefully. A script that counts lines breaks on the next upgrade, while one that looks up `connected_clients` by name keeps working.
- Your on-call account gets a NOPERM error when it runs INFO. Why might that happen on a locked-down server?`INFO` sits in the `@slow` and `@dangerous` ACL categories, so a user whose rules remove `@dangerous` is refused before the command runs. An administrator can add `+info` to that user, which grants this one command without granting the rest of the category.
- How is instantaneous_ops_per_sec different from dividing total_commands_processed by uptime_in_seconds?`instantaneous_ops_per_sec` is a mean of 16 samples taken every 100 ms, so it shows the last moments. The division gives an average over the server's whole life, which flattens every peak, and it is wrong after a `CONFIG RESETSTAT`, which zeroes the counter but not the uptime.
- Plain INFO returns every section, including commandstats and latencystats.
- redis_mode tells you whether this node is a primary or a replica.
- INFO all includes the fields that modules generate.
- total_commands_processed is a current rate you can read off directly.
- redis-cli INFO on one cluster node reports the totals for the whole cluster.
- A low instantaneous_ops_per_sec proves the instance has plenty of spare capacity.
Assumes Redis 8.10, whose default INFO set includes threads, hotkeys and keysizes; naming several sections needs Redis 7.0 or later.