redis 监听
redis-cli -h server的ip -p server的端口 -a server的密码 monitor
windows下的脚本,保存为redis-monitor.bat,然后运行即可
@echo off
title redis-monitor
cd redis-cli工具所在的路径
redis-cli -h 127.0.0.1 -p 6379 -a 123456 monitor
linux的写法,保存为redis-monitor.sh,并加权限 sudo chmod +x redis-monitor.sh
运行:./redis-monitor.sh
#!/bin/bash
cd /home/redis
redis-cli -h 127.0.0.1 -p 6379 -a 123456 monitor
dbsize