tomcat 批量停脚本

cd /app/edms/autoscript 自定义存放路径 tomcat批量停脚本
./stopAllService.sh 批量停脚本 名称

ps -ef|grep tomcat_7961|awk '{printf("kill -9 %s\n",$2)}' |sh

ps -ef|grep tomcat_7971|awk '{printf("kill -9 %s\n",$2)}' |sh

ps -ef|grep tomcat_7981|awk '{printf("kill -9 %s\n",$2)}' |sh

ps -ef|grep tomcat_7991|awk '{printf("kill -9 %s\n",$2)}' |sh

 

批量启脚本 名称 先清理日志 在清理tomcat work缓存 每个启动服务 间隔30秒后再启动下一个
./startAllService.sh 

cd /app/domains/tomcat_7961_1
rm -rf logs/*
rm -rf work/*
./bin/startup.sh
sleep 30

cd /app/domains/tomcat_7971_1
rm -rf logs/*
rm -rf work/*
./bin/startup.sh
sleep 30

cd /app/domains/tomcat_7981_1
rm -rf logs/*
rm -rf work/*
./bin/startup.sh
sleep 30

cd /app/domains/tomcat_7991_1
rm -rf logs/*
rm -rf work/*
./bin/startup.sh

批量清理tomcat work 缓存文件 间隔3秒
./clearAllwork.sh 
cd /app/domains/tomcat_7961_1
rm -rf work/*
sleep 3

cd /app/domains/tomcat_7971_1
#rm -rf logs/*
rm -rf work/*
sleep 3

 

 批量清理tomcat日志和 tomcat work缓存文件间隔3秒

./cleanAllcache.sh 

cd /app/domains/tomcat_7961_1
rm -rf logs/*
rm -rf work/*
sleep 3

cd /app/domains/tomcat_7971_1
rm -rf logs/*
rm -rf work/*
sleep 3

cd /app/domains/tomcat_7981_1
rm -rf logs/*
rm -rf work/*
sleep 3

cd /app/domains/tomcat_7991_1
rm -rf logs/*
rm -rf work/*
sleep 3

posted @ 2019-12-19 09:45  EasTward  阅读(188)  评论(0编辑  收藏  举报