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
Important points
- This command can expose administrative information or make a broad destructive change. Restrict it to trusted code paths.
defaultandallreturn 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.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 TLSREDIS_URL from the Upstash console. REST examples use UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN.
Redis CLI
Redis CLI
@upstash/redis
@upstash/redis
This command is not supported yet in
@upstash/redis.upstash_redis
upstash_redis
This command is not supported yet in
upstash_redis.ioredis
ioredis
node-redis
node-redis
redis-py
redis-py
go-redis
go-redis
jedis
jedis
redis-rs
redis-rs