当前位置:网站首页>Redis批量启停脚本
Redis批量启停脚本
2022-07-03 07:42:00 【老王笔记】
Redis多实例部署,往往单个机器中会部署多套Redis实例,对每个Redis停止活着开启较为耗费时间;特此编写批量启停脚本
#!/bin/bash
info="""
=======================
sh service.sh start
sh service.sh stop
======================
"""
start()
{
for x in `ls /export/data/redis/63*.conf`;do echo $x;/usr/local/bin/redis-server $x;done
echo "redis started"
}
stop()
{
ps -ef | grep redis-server | awk '{print $2}' | xargs kill -9
echo "redis stoped"
}
case $1 in
start)
start
;;
stop)
stop
;;
restart)
stop
sleep 3
start
;;
*)
echo $info
;;
esac运行效果如下:
边栏推荐
- pgAdmin 4 v6.11 发布,PostgreSQL 开源图形化管理工具
- Technical dry goods | hundred lines of code to write Bert, Shengsi mindspire ability reward
- 一篇文章让你读懂-曼彻斯特编码
- 技术干货|AI框架动静态图统一的思考
- Epoll related references
- Why is data service the direction of the next generation data center?
- 华为交换机配置ssh登录远程管理交换机
- experiment.........
- Enter three times and guess a number
- Go language foundation ----- 08 ----- interface
猜你喜欢

UA camouflage, get and post in requests carry parameters to obtain JSON format content

【LeetCode】3. Merge Two Sorted Lists·合并两个有序链表

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

技术干货|昇思MindSpore NLP模型迁移之LUKE模型——阅读理解任务

研究显示乳腺癌细胞更容易在患者睡觉时进入血液

PAT甲级 1031 Hello World for U

Inverted chain disk storage in Lucene (pfordelta)

Robots protocol

Application of pigeon nest principle in Lucene minshouldmatchsumscorer

圖像識別與檢測--筆記
随机推荐
Sent by mqtt client server of vertx
Go language foundation ----- 15 ----- reflection
C2-关于VCF文件合并的几种方法
[coppeliasim4.3] C calls UR5 in the remoteapi control scenario
Lucene introduces NFA
Go language foundation ----- 16 ----- goroutine, GPM model
An overview of IfM Engage
Project experience sharing: realize an IR Fusion optimization pass of Shengsi mindspire layer
【MySQL 11】怎么解决MySQL 8.0.18 大小写敏感问题
PAT甲级 1030 Travel Plan
论文学习——鄱阳湖星子站水位时间序列相似度研究
【LeetCode】3. Merge Two Sorted Lists·合并两个有序链表
【MySQL 14】使用DBeaver工具远程备份及恢复MySQL数据库(Linux 环境)
PAT甲级 1032 Sharing
Image recognition and detection -- Notes
技术干货|AI框架动静态图统一的思考
Technology dry goods | luxe model for the migration of mindspore NLP model -- reading comprehension task
技术干货|百行代码写BERT,昇思MindSpore能力大赏
UA camouflage, get and post in requests carry parameters to obtain JSON format content
Vertx multi vertical shared data