当前位置:网站首页>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
运行效果如下:
边栏推荐
- Technical dry goods Shengsi mindspire elementary course online: from basic concepts to practical operation, 1 hour to start!
- Logging log configuration of vertx
- HarmonyOS第三次培训笔记
- PHP常用排序算法
- Es writing fragment process
- Hisat2 - stringtie - deseq2 pipeline for bulk RNA seq
- Go language foundation ----- 18 ----- collaboration security, mutex lock, read-write lock, anonymous lock, sync Once
- 华为S5700交换机初始化和配置telnet,ssh用户方法
- 华为交换机:配置telnet和ssh、web访问
- Introduction of novel RNA based cancer therapies
猜你喜欢
技术干货|昇思MindSpore初级课程上线:从基本概念到实操,1小时上手!
Technical dry goods Shengsi mindspire innovation model EPP mvsnet high-precision and efficient 3D reconstruction
UA camouflage, get and post in requests carry parameters to obtain JSON format content
Go language foundation ----- 09 ----- exception handling (error, panic, recover)
Go language foundation ----- 19 ----- context usage principle, interface, derived context (the multiplexing of select can be better understood here)
技术干货|昇思MindSpore可变序列长度的动态Transformer已发布!
Project experience sharing: realize an IR Fusion optimization pass of Shengsi mindspire layer
Partage de l'expérience du projet: mise en œuvre d'un pass optimisé pour la fusion IR de la couche mindstore
PAT甲级 1028 List Sorting
Leetcode 198: house raiding
随机推荐
Responsive MySQL of vertx
【开发笔记】基于机智云4G转接板GC211的设备上云APP控制
Hisat2 - stringtie - deseq2 pipeline for bulk RNA seq
Technical dry goods Shengsi mindspire operator parallel + heterogeneous parallel, enabling 32 card training 242 billion parameter model
Go language foundation ----- 18 ----- collaboration security, mutex lock, read-write lock, anonymous lock, sync Once
UA camouflage, get and post in requests carry parameters to obtain JSON format content
Enter three times and guess a number
go语言-循环语句
The difference between typescript let and VaR
s7700设备如何清除console密码
Inverted chain disk storage in Lucene (pfordelta)
[Development Notes] cloud app control on device based on smart cloud 4G adapter gc211
The babbage industrial policy forum
【MySQL 13】安装MySQL后第一次修改密码,可以可跳过MySQL密码验证进行登录
Go language foundation ----- 03 ----- process control, function, value transfer, reference transfer, defer function
Implementation of breadth first in aggregation in ES
Partage de l'expérience du projet: mise en œuvre d'un pass optimisé pour la fusion IR de la couche mindstore
【MySQL 12】MySQL 8.0.18 重新初始化
OSPF experiment
Go language foundation ----- 16 ----- goroutine, GPM model