Redis Ping 命令

Redis 教程 · 2019-03-08 12:26:40

Redis Ping 命令使用客户端向 Redis 服务器发送一个 PING ,如果服务器运作正常的话,会返回一个 PONG 。

通常用于测试与服务器的连接是否仍然生效,或者用于测量延迟值。

语法

redis Ping 命令基本语法如下:

redis 127.0.0.1:6379> PING 

可用版本

>= 1.0.0

返回值

如果连接正常就返回一个 PONG ,否则返回一个连接错误。

实例

# 客户端和服务器连接正常

redis 127.0.0.1:6379> PING
PONG

# 客户端和服务器连接不正常(网络不正常或服务器未能正常运行)

redis 127.0.0.1:6379> PING
Could not connect to Redis at 127.0.0.1:6379: Connection refused

点击查看所有 Redis 教程 文章: https://www.codercto.com/courses/l/33.html

查看所有标签

Writing Windows VxDs and Device Drivers, Second Edition

Writing Windows VxDs and Device Drivers, Second Edition

Karen Hazzah / CMP / 1996-01-12 / USD 54.95

Software developer and author Karen Hazzah expands her original treatise on device drivers in the second edition of "Writing Windows VxDs and Device Drivers." The book and companion disk include the a......一起来看看 《Writing Windows VxDs and Device Drivers, Second Edition》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具