Databases 16 min read

Master Redis Monitoring: Tools, Commands, and Real‑World Benchmarks

This guide walks through Redis's built‑in monitoring utilities—including redis‑benchmark, redis‑cli info, and slowlog—explains their command‑line options, shows practical examples and performance results, and introduces third‑party visual tools like RedisLive and redis‑faina for deeper insight.

Linux Cloud Computing Practice
Linux Cloud Computing Practice
Linux Cloud Computing Practice
Master Redis Monitoring: Tools, Commands, and Real‑World Benchmarks

redis-benchmark

1.1 Introduction – Redis ships with a performance testing tool called redis-benchmark that can simulate N clients issuing Y requests simultaneously.

1.2 Command format –

redis-benchmark [-h <host>] [-p <port>] [-c <clients>] [-n <requests>] [-k <keepalive>]

Parameters

-h

: server hostname (default 127.0.0.1) -p: server port (default 6379) -s: server socket -c: number of parallel connections (default 50) -n: total number of requests (default 10000) -d: data size of SET/GET values in bytes (default 2) -k: 1 =keep‑alive, 0 =reconnect (default 1) -r: use random keys/values for certain commands -P: pipeline <numreq> requests -q: quiet mode – only show queries per second --csv: output in CSV format -l: loop forever -t: run only the comma‑separated list of tests -I: idle mode – open N idle connections and wait

Examples

Run 1,000 requests and display only the query‑per‑second value:

redis-benchmark -n 1000 -q

Run 10,000 requests with 50 concurrent clients:

redis-benchmark -h localhost -p 6379 -c 50 -n 10000
====== PING_INLINE ======
10000 requests completed in 0.11 seconds
50 parallel clients
3 bytes payload
keep alive: 1
96.25% <= 1 ms
88495.58 requests per second
... (output truncated for brevity) ...

redis-cli

2.1 Introduction – Use redis-cli to view connections and read/write operations.

2.2 Command format – redis-cli -h <host> -p <port> monitor 2.3 Example – Monitoring live traffic:

2.4 redis-cli info – The info command returns a status report covering Server, Clients, Memory, Persistence, Stats, Replication, CPU, and Keyspace.

# Server
redis_version:5.0.2
redis_git_sha1:00000000
redis_mode:standalone
os:Linux 2.6.32-220.7.1.el6.x86_64 x86_64
arch_bits:64
... (other sections omitted for brevity) ...
# Keyspace
db0:keys=3,expires=0,avg_ttl=0

Run redis-cli info to retrieve the full report.

showlog (slowlog)

3.1 Introduction – Redis's SLOWLOG records queries whose execution time exceeds a configurable threshold. It lives only in memory, so it does not impact performance.

3.2 Command format

CONFIG SET slowlog-log-slower-than 6000
CONFIG SET slowlog-max-len 25

RedisLive

4.1 Introduction – RedisLive is an open‑source Python‑based graphical monitoring tool that uses Redis's INFO and MONITOR commands. It supports multiple instances and stores monitoring data in Redis or SQLite.

4.2 Installation

yum install epel-release
sudo yum install python-pip
pip install --upgrade pip
tpip install tornado
pip install redis
pip install python-dateutil

4.3 Clone and configure

Clone the repository: git clone https://github.com/nkrode/RedisLive.git Edit redis-live.conf (example snippet):

{
    "RedisServers": [
        {
            "server": "127.0.0.1",
            "port": 6379,
            "password": "some-password"
        }
    ],
    "DataStoreType": "redis",
    "RedisStatsServer": {
        "server": "127.0.0.1",
        "port": 6379,
        "password": "some-password"
    },
    "SqliteStatsStore": {
        "path": "db/redislive.sqlite"
    }
}

4.4 Start monitoring

Run the monitor (collects data every 60 seconds): ./redis-monitor.py --duration=60 In another terminal, start the web UI:

./redis-live.py

redis-faina

5.1 Introduction – Developed by Instagram, redis-faina analyzes query patterns by consuming the output of the MONITOR command.

5.2 Installation git clone https://github.com/facebookarchive/redis-faina.git 5.3 Usage

usage: redis-faina.py [-h] [--prefix-delimiter PREFIX_DELIMITER]
                      [--redis-version REDIS_VERSION] [input]

positional arguments:
  input                 File to parse; will read from stdin otherwise

optional arguments:
  -h, --help            show this help message and exit
  --prefix-delimiter PREFIX_DELIMITER
                        String to split on for delimiting prefix and rest of key
  --redis-version REDIS_VERSION
                        Version of the redis server being monitored

Typical workflow:

redis-cli -p 6379 MONITOR | head -n 1000 | ./redis-faina.py --prefix-delimiter ':'

Sample output highlights top prefixes, keys, commands, latency statistics, and the slowest calls.

Other Redis monitoring tools

https://github.com/junegunn/redis-stat

https://github.com/steelThread/redmon

https://github.com/oliver006/redis_exporter

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

CLIBenchmarkSlowlogredis-fainaredislive
Linux Cloud Computing Practice
Written by

Linux Cloud Computing Practice

Welcome to Linux Cloud Computing Practice. We offer high-quality articles on Linux, cloud computing, DevOps, networking and related topics. Dive in and start your Linux cloud computing journey!

0 followers
Reader feedback

How this landed with the community

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.