当前位置:网站首页>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运行效果如下:
边栏推荐
- Vertx metric Prometheus monitoring indicators
- 哪一刻你才发现青春结束了
- Professor Zhang Yang of the University of Michigan is employed as a visiting professor of Shanghai Jiaotong University, China (picture)
- 项目经验分享:实现一个昇思MindSpore 图层 IR 融合优化 pass
- Industrial resilience
- Unity XR实现交互(抓取,移动旋转,传送,射击)-Pico
- Comparison of advantages and disadvantages between most complete SQL and NoSQL
- OSPF protocol summary
- Go language foundation ----- 13 ----- file
- Go language foundation ----- 02 ----- basic data types and operators
猜你喜欢

【LeetCode】2. Valid Parentheses·有效的括号

HCIA notes

项目经验分享:实现一个昇思MindSpore 图层 IR 融合优化 pass

项目经验分享:基于昇思MindSpore实现手写汉字识别

PAT甲级 1032 Sharing

技术干货|AI框架动静态图统一的思考

Go language foundation ----- 15 ----- reflection

Go language foundation ----- 19 ----- context usage principle, interface, derived context (the multiplexing of select can be better understood here)

Iterm2设置

Traversal in Lucene
随机推荐
[coppeliasim4.3] C calls UR5 in the remoteapi control scenario
Iterm2设置
图像识别与检测--笔记
圖像識別與檢測--筆記
Qtip2 solves the problem of too many texts
Hisat2 - stringtie - deseq2 pipeline for bulk RNA seq
SQL create temporary table
VMware network mode - bridge, host only, NAT network
技术干货 | AlphaFold/ RoseTTAFold开源复现(2)—AlphaFold流程分析和训练构建
Hnsw introduction and some reference articles in lucene9
Go language foundation ----- 03 ----- process control, function, value transfer, reference transfer, defer function
Vertx metric Prometheus monitoring indicators
Partage de l'expérience du projet: mise en œuvre d'un pass optimisé pour la fusion IR de la couche mindstore
Unified handling and interception of exception exceptions of vertx
项目经验分享:基于昇思MindSpore实现手写汉字识别
Various postures of CS without online line
Pat grade a 1029 median
Comparison of advantages and disadvantages between most complete SQL and NoSQL
Go language foundation ----- 09 ----- exception handling (error, panic, recover)
HDMI2.1与HDMI2.0的区别以及转换PD信号。