↑ ↓ select, Enter open, Esc close

Show used Redis databases and key counts

user@server
redis-cli INFO keyspace

Prints one line per used database, such as db0:keys=15234,expires=1200,avg_ttl=0. This shows at a glance which database numbers are used by different websites or applications. Empty databases are not listed.

Note: If several WordPress installations share one Redis server, each should have its own database number or its own prefix.

Also searched as

  • which redis databases are in use
  • redis keys per database
  • redis db0 db1 overview

Related one-liners

All in Redis and Memcached

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.