当前位置:网站首页>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运行效果如下:
边栏推荐
- 【LeetCode】3. Merge Two Sorted Lists·合并两个有序链表
- 微软安全响应中心
- Beginners use Minio
- The difference between typescript let and VaR
- OSPF experiment
- Leetcode 198: house raiding
- UA camouflage, get and post in requests carry parameters to obtain JSON format content
- Usage of requests module
- Rabbit MQ message sending of vertx
- 项目经验分享:基于昇思MindSpore实现手写汉字识别
猜你喜欢

技术干货|昇思MindSpore NLP模型迁移之Roberta ——情感分析任务

Paper learning -- Study on the similarity of water level time series of Xingzi station in Poyang Lake

How long is the fastest time you can develop data API? One minute is enough for me

HarmonyOS第三次培训笔记

Go language foundation ----- 03 ----- process control, function, value transfer, reference transfer, defer function

Leetcode 198: house raiding

The concept of C language pointer
![[mindspire paper presentation] summary of training skills in AAAI long tail problem](/img/34/9c9ec1b94edeecd4a3e7f20fdd8356.png)
[mindspire paper presentation] summary of training skills in AAAI long tail problem

【MySQL 11】怎么解决MySQL 8.0.18 大小写敏感问题

Epoll related references
随机推荐
Robots protocol
The difference between typescript let and VaR
項目經驗分享:實現一個昇思MindSpore 圖層 IR 融合優化 pass
Vertx metric Prometheus monitoring indicators
Hnsw introduction and some reference articles in lucene9
Pat grade a 1029 median
HarmonyOS第三次培训笔记
Go language foundation ----- 11 ----- regular expression
基于RNA的新型癌症疗法介绍
Go language foundation ----- 15 ----- reflection
Lucene introduces NFA
Structure of golang
Technical dry goods Shengsi mindspire lite1.5 feature release, bringing a new end-to-end AI experience
昇思MindSpore再升级,深度科学计算的极致创新
Vertx's responsive redis client
华为S5700交换机初始化和配置telnet,ssh用户方法
The concept of C language pointer
Beginners use Minio
技术干货|昇思MindSpore NLP模型迁移之LUKE模型——阅读理解任务
C2-关于VCF文件合并的几种方法