4 Star 5 Fork 6

李xiangxiang/kettle管理系统

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
ry.bat 1.69 KB
一键复制 编辑 原始数据 按行查看 历史
李xiangxiang 提交于 2021-11-24 19:04 . kt-watchdog系统搭建完毕
@echo off
rem jarƽ��Ŀ¼
set AppName=kt-watchdog-admin.jar
rem JVM����
set JVM_OPTS="-Dname=%AppName% -Duser.timezone=Asia/Shanghai -Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:NewRatio=1 -XX:SurvivorRatio=30 -XX:+UseParallelGC -XX:+UseParallelOldGC"
ECHO.
ECHO. [1] ����%AppName%
ECHO. [2] �ر�%AppName%
ECHO. [3] ����%AppName%
ECHO. [4] ����״̬ %AppName%
ECHO. [5] �� ��
ECHO.
ECHO.������ѡ����Ŀ�����:
set /p ID=
IF "%id%"=="1" GOTO start
IF "%id%"=="2" GOTO stop
IF "%id%"=="3" GOTO restart
IF "%id%"=="4" GOTO status
IF "%id%"=="5" EXIT
PAUSE
:start
for /f "usebackq tokens=1-2" %%a in (`jps -l ^| findstr %AppName%`) do (
set pid=%%a
set image_name=%%b
)
if defined pid (
echo %%is running
PAUSE
)
start javaw %JAVA_OPTS% -jar %AppName%
echo starting����
echo Start %AppName% success...
goto:eof
rem ����stopͨ��jps�������pid����������
:stop
for /f "usebackq tokens=1-2" %%a in (`jps -l ^| findstr %AppName%`) do (
set pid=%%a
set image_name=%%b
)
if not defined pid (echo process %AppName% does not exists) else (
echo prepare to kill %image_name%
echo start kill %pid% ...
rem ���ݽ���ID��kill����
taskkill /f /pid %pid%
)
goto:eof
:restart
call :stop
call :start
goto:eof
:status
for /f "usebackq tokens=1-2" %%a in (`jps -l ^| findstr %AppName%`) do (
set pid=%%a
set image_name=%%b
)
if not defined pid (echo process %AppName% is dead ) else (
echo %image_name% is running
)
goto:eof
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/li_xiangxiang/kt-watchdog.git
git@gitee.com:li_xiangxiang/kt-watchdog.git
li_xiangxiang
kt-watchdog
kettle管理系统
master

搜索帮助