Operations 6 min read

Essential Redis Monitoring Metrics and Commands for Effective Operations

This guide details key Redis monitoring metrics—including performance, memory, activity, persistence, and error indicators—along with practical commands, configuration settings, and code snippets to help operators efficiently track and troubleshoot Redis instances.

Efficient Ops
Efficient Ops
Efficient Ops
Essential Redis Monitoring Metrics and Commands for Effective Operations

Monitoring Metrics

Performance

Memory

Basic activity

Persistence

Error

Monitoring Methods

redis-benchmark

redis-stat

redis-faina

redislive

redis-cli

monitor

showlog

Key slowlog commands:

get

(retrieve slow query log),

len

(log entry count),

reset

(clear log).

Relevant configuration:

slowlog-log-slower-than 1000 # threshold in microseconds
slowlog-max-len 100 # max number of log entries

The

info

command can fetch all or specific sections of server information.

server – server environment parameters

clients – client-related information

memory – memory statistics

persistence – persistence information

stats – general statistics

Replication – master‑slave replication details

CPU – CPU usage

cluster – cluster information

Keyspace – key‑value statistics

Example usage:

./redis-cli info | grep ops            # operations per second
./redis-cli info stats | grep ops
./redis-cli info server

Performance Monitoring

redis-cli info | grep ops # operations per second

Memory Monitoring

[root@CombCloud-2020110836 src]# ./redis-cli info | grep used | grep human
used_memory_human:2.99M  # total memory allocated by allocator
used_memory_rss_human:8.04M  # memory as seen by OS (top)
used_memory_peak_human:7.77M # peak memory consumption
used_memory_lua_human:37.00K # Lua engine memory usage

Blocked clients caused by BLPOP/BRPOP/BRPOPLPUSH:

./redis-cli info | grep blocked_clients
blocked_clients:0

Keys evicted due to max‑memory limit:

./redis-cli info | grep evicted_keys
evicted_keys:0

Memory fragmentation ratio:

./redis-cli info | grep mem_fragmentation_ratio
mem_fragmentation_ratio:2.74

Used memory:

./redis-cli info | grep used_memory:
used_memory:3133624

Basic Activity Metrics

Number of connected clients indicates unexpected connections; use

client list

to investigate.

./redis-cli info | grep connected_clients
connected_clients:1
./redis-cli info | grep connected
connected_clients:1   # client connections
connected_slaves:1    # slave connections

Persistence Metrics

./redis-cli info | grep rdb_last_save_time
rdb_last_save_time:1591876204  # timestamp of last RDB save
./redis-cli info | grep rdb_changes_since_last_save
rdb_changes_since_last_save:0   # changes since last save

Error Metrics

High rejected connections indicate low

maxclients

setting.

./redis-cli info | grep connected_clients
connected_clients:1

Keyspace misses (lookup failures):

./redis-cli info | grep keyspace
keyspace_misses:0

Replication backlog size and partial sync errors help assess replication health:

./redis-cli info | grep repl_backlog_size
repl_backlog_size:1048576
./redis-cli info | grep sync_partial_err
sync_partial_err:1

Redis Performance Test Commands

./redis-benchmark -c 100 -n 5000

This runs a benchmark with 100 concurrent connections and 5,000 requests.

monitoringPerformanceoperationsRedismetricsLinux
Efficient Ops
Written by

Efficient Ops

This public account is maintained by Xiaotianguo and friends, regularly publishing widely-read original technical articles. We focus on operations transformation and accompany you throughout your operations career, growing together happily.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.