redis 状态监测
作者:csuper
发表于:2021-06-07
检测后台进程是否存在

ps -ef |grep redis
检测6379端口是否在监听
netstat -lntp | grep 6379
使用redis-cli客户端检测连接是否正常
查看redis状态:
systemctl status redis
测试一下客户端存取是否正常:
redis-cli
127.0.0.1:6379> keys *
(empty list or set)
127.0.0.1:6379> set key "hello world"
OK
127.0.0.1:6379> get key
"hello world"
停止redis:
#停止
systemctl stop redis
#启动
systemctl start redis
#重新载入
systemctl reload redis
版权声明
本文仅代表作者观点,不代表Csuper立场。
本文系作者授权百度百家发表,未经许可,不得转载。