English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The Redis Ping command sends a PING to the Redis server using the client. If the server is running normally, it will return a PONG.
It is usually used to test whether the connection with the server is still valid, or to measure the delay value.
The basic syntax of the Redis Ping command is as follows:
redis 127.0.0.1:6379> PING
>= 1.0.0
If the connection is normal, it will return a PONG, otherwise it will return a connection error.
# Client and server connection is normal redis 127.0.0.1:6379> PING PONG # Client and server connection is abnormal (network problem or server is not running normally) redis 127.0.0.1:6379> PING Could not connect to Redis at 127.0.0.1:6379: Connection refused