Check if Redis is Running

Check if Redis is Running

Redis is an in-memory data structure store that is used as a database, cache, and message broker. To ensure that Redis server is operating correctly, it's essential to know how to check its status. This tutorial shows how to check if Redis is running.

The redis-cli is the command line tool for interacting with a Redis. This tool allows performing a wide range of tasks. Run the following command in the terminal:

redis-cli ping

If Redis is running, it will return PONG. If Redis is not running, you will receive an error message indicating that the connection failed.

We can also specify a host and port to check the status of a remote Redis server:

redis-cli -h 127.0.0.1 -p 6379 ping

Leave a Comment

Cancel reply

Your email address will not be published.