原文:shell脚本实现定时重启进程

...

2018-03-28 09:40 0 2267 推荐指数:

查看详情

编写shell脚本实现tomcat定时重启

最近我在学生价买的低配服务器上部署了一个很吃内存的网页,导致 tomcat 内存经常溢出而崩溃。 于是我上网找了一些教程编写了一个简单的每天定时启动 tomcat 的脚本,特此记录一下 我的环境是 centos 7 1、 在某个目录新建一个 .sh 脚本文件 vim ...

Thu Jun 11 05:43:00 CST 2020 0 613
Linux下使用shell脚本+定时任务crontab实现定时重启Jar包

最近项目上有个小需求,在Linux下定时重启SpringBoot项目打好的Jar包,定时任务使用crontable。 crontable -e 添加定时任务,例如:*/3 * * * * /usr/lcoal/autoRestart.sh,每3分钟执行autoRestart脚本 ...

Sat Apr 17 00:43:00 CST 2021 0 640
shell脚本监测进程重启

本人实例: #!/bin/bash ps -ef | grep elastic | grep -v grepif [ $? -ne 0 ]thenecho "start process......" ...

Wed Feb 12 19:35:00 CST 2020 0 667
shell脚本实现程序重启

NAME="demo-0.0.1-SNAPSHOT.jar" #想要杀死的进程ID=`ps -ef | grep "$NAME" | grep -v "grep" | awk '{print $2}'`if [ -z "$ID" ];then   echo "process id is empty ...

Tue Aug 04 00:38:00 CST 2020 0 682
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM