英[pɪŋ] 美[pɪŋ]

n.<non-positive>bang;the bang of bullets flying;Internet Packet Explorer

v. <Not positive> Make a banging sound

Third person singular: pings Plural: pings Present participle: pinging Past tense: pinged Past participle: pinged

redis PING command syntax

Function:Use the client to send a PING to the Redis server. If the server is operating normally, a PONG will be returned.

Syntax: PING

Description: Usually used to test whether the connection to the server is still valid, or to measure the latency value.

Available versions: >= 1.0.0

Time complexity: O(1)

Return: If the connection is normal, return a PONG, otherwise return a connection error.

redis PING command example

# 客户端和服务器连接正常
redis> PING
PONG
# 客户端和服务器连接不正常(网络不正常或服务器未能正常运行)
redis 127.0.0.1:6379> PING
Could not connect to Redis at 127.0.0.1:6379: Connection refused