Upstash Documentation

INFO

Get server statistics and information.
2 min read

Use INFO to get statistics and information about the server.

The reply groups fields into sections such as server, clients, memory, stats, replication, and keyspace, and passing a section name limits the reply to that one. It is the usual source for operational numbers such as connected clients, memory in use, hit and miss counts, and the number of keys per database.

On Upstash, default and all return the same set of sections, and a section name that is not supported produces only its heading. The reply is a CRLF-delimited text report rather than a RESP map, so parse it defensively, since fields may be added over time.

Syntax#

Arguments#

ArgumentRequiredRepeatableDescription
sectionNoNoSection to return: server, clients, memory, stats, cluster, keyspace, default, or all.

Important points#

  • This command can expose administrative information or make a broad destructive change. Restrict it to trusted code paths.
  • default and all return the same Upstash section set. Unsupported section names produce only a section heading.
  • The reply is a CRLF-delimited text report, not a RESP map. Parse it defensively because fields may be added over time.

Response#

The reply reports the result of the operation. Error replies have the same shape in RESP2 and RESP3 and are surfaced as exceptions by the SDKs below.

ProtocolReply
RESP2Bulk string
RESP3Bulk string
Note

Client libraries often decode bulk strings, maps, sets, and numeric strings into language-native values. The table describes the Redis wire reply.

Examples#

TCP examples use the TLS REDIS_URL from the Upstash console. REST examples use UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN.

Redis CLI
@upstash/redis
Note

This command is not supported yet in @upstash/redis.

upstash_redis
Note

This command is not supported yet in upstash_redis.

ioredis
node-redis
redis-py
go-redis
jedis
redis-rs