最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Windows系统Tomcat重启批处理脚本
时间:2022-06-30 17:55:45 编辑:袖梨 来源:一聚教程网
Tomcat重启脚本,送给有需要的JSP环境运维同行们~
运行环境:XP/windows 2003测试通过,其他环境由于手头上条件限制未测试;
脚本功能:在常规调用tomcat自带的关闭/重启脚本中加入假死判断,若出现假死则予以强行Kill掉相关JAVA进程;
脚本特点:可在tomcat/Jboss/apache混合平台使用,针对性的只重启tomcat相关进程;
注意事项:就是注意tomcat环境变量是否正确即可。
@echo off
title Tomcat重?⒔疟?br />
call "%tomcat_home%binshutdown.bat"
ping -n 6 127.1 >nul
wmic process where name="java.exe" get processid,commandline |findstr /i "tomcat" >#
setlocal enabledelayedexpansion
for /f "delims=*" %%i in (#) do (
set var=%%i
set var=!var:start =#!
for /f "tokens=2 delims=#" %%a in ("!var!") do (
set tomcatpid=%%a
)
)
del # >nul
if defined tomcatpid taskkill /pid !tomcatpid!
ping -n 3 127.1 >nul
call "%tomcat_home%binstartup.bat"
exit
相关文章
- 英雄联盟手游雪境奇谈活动有什么内容 12-11
- 星球重启二哈心愿2完成方法 二哈心愿2怎么完成 12-11
- 阿凡达潘多拉边境池沼蜂巢花蜜获得方式攻略 12-11
- 星球重启能源耗尽任务攻略 能源耗尽怎么做 12-11
- 崩坏星穹铁道货币战争光盾流阿雅有什么玩法技巧 12-11
- 星球重启熔炼数据获取方法 熔炼数据怎么获得 12-11