当前位置:网站首页>Redis查看客户端连接
Redis查看客户端连接
2022-07-03 07:42:00 【老王笔记】
单个实例查看客户端连接较为简单
client list现在手上拿到几台物理机,每台物理机部署了100个实例,由于是以前遗留下来的实例,不知道能否下线,想知道这批机器是否有人使用?
如果想知道有没有人使用,就要连上去看看上面是否有客户端连接;
现在问题是系统里面部署了70多个实例,每个实例密码不一样; 总不能一个个通过端口连接每个实例,并一个个尝试密码;
首先获取所有port
ps -ef | grep redis | awk -F: '{print $NF}' > port.list获取所有密码
grep pass */*.conf | awk '{print $NF}' | sort | uniq > auth.list循环遍历每个密码和端口,尝试连接,并获取连接信息
#!/bin/bash
for auth in `cat auth.list`
do
#echo $x;
for port in `cat port.list`
do
#echo $x;
echo client list | /export/Data/redis/bin/redis-cli -h 127.0.0.1 -p $port -a $auth
done
done
边栏推荐
- experiment.........
- 华为S5700交换机初始化和配置SSH和TELNET远程登录方法
- Some basic operations of reflection
- [coppeliasim4.3] C calls UR5 in the remoteapi control scenario
- Epoll related references
- Vertx's responsive MySQL template
- 技术干货|AI框架动静态图统一的思考
- Leetcode 213: 打家劫舍 II
- Hisat2 - stringtie - deseq2 pipeline for bulk RNA seq
- 基于RNA的新型癌症疗法介绍
猜你喜欢

Shengsi mindspire is upgraded again, the ultimate innovation of deep scientific computing

Project experience sharing: realize an IR Fusion optimization pass of Shengsi mindspire layer

Leetcode 198: 打家劫舍

Go language foundation ----- 09 ----- exception handling (error, panic, recover)

Analysis of the problems of the 11th Blue Bridge Cup single chip microcomputer provincial competition

Reconnaissance et détection d'images - Notes

Go language foundation ----- 02 ----- basic data types and operators

密西根大学张阳教授受聘中国上海交通大学客座教授(图)

Analysis of the eighth Blue Bridge Cup single chip microcomputer provincial competition

Collector in ES (percentile / base)
随机推荐
Go language foundation ----- 11 ----- regular expression
项目经验分享:基于昇思MindSpore,使用DFCNN和CTC损失函数的声学模型实现
Lombok cooperates with @slf4j and logback to realize logging
OSPF experiment
Go language foundation ----- 07 ----- method
List exercises after class
论文学习——鄱阳湖星子站水位时间序列相似度研究
Comparison of advantages and disadvantages between most complete SQL and NoSQL
图像识别与检测--笔记
Analysis of the problems of the 12th Blue Bridge Cup single chip microcomputer provincial competition
Technology dry goods | luxe model for the migration of mindspore NLP model -- reading comprehension task
Technical dry goods Shengsi mindspire elementary course online: from basic concepts to practical operation, 1 hour to start!
【LeetCode】3. Merge Two Sorted Lists·合并两个有序链表
Grpc message sending of vertx
HarmonyOS第三次培训笔记
华为交换机:配置telnet和ssh、web访问
Collector in ES (percentile / base)
Go language foundation ----- 15 ----- reflection
PAT甲级 1030 Travel Plan
Rabbit MQ message sending of vertx