一个windows批处理文件的例子(bat)
2010-11-09 16:20
513 查看
@REM ----------------------------------------------------------------------------------
@REM Remove JVM parameter if WAS has been configured by ITCAMDC
@REM Syntax:
@REM For WebSphere ND servers:
@REM Command: ITCAM_remover.bat <Profile Home> <Server Name> SOAP
@REM Prerequisite: The dmgr and nodeagent is running.
@REM For WebSphere Base/Process/ESB/Portal servers:
@REM Command: ITCAM_remover.bat <Profile Home> <Server Name>
@REM Where "Profile Home" is the WebSphere profile home that has been configured by ITCAM DataCollector
@REM "Server Name" is the WebSphere server name that has been configured by ITCAM DataCollector
@REM ----------------------------------------------------------------------------------
@echo off
set phost=%1
set srvname=%2
if "%3"=="" (
set conntype=NONE
)else (
set conntype=%3
)
if "%phost%"=="" goto spec
if "%srvname%"=="" goto spec
set /p rmOrNot=This tool will remove ITCAM JVM paramters form this WAS instance?Are you sure?[Y,N]?
if /i %rmOrNot%==Y goto rm
if /i not %rmOrNot%==y goto end
:rm
@REM echo %phost%
@REM echo %srvname%
@REM echo %conntype%
call %phost%/bin/setupCmdLine.bat
@REM echo %WAS_CELL%
@REM echo %WAS_NODE%
goto exec
:spec
echo ====================================================================================================
echo For WebSphere ND servers:
echo Command :ITCAM_remover.bat ^<Profile Home^> ^<Server Name^> SOAP
echo Prerequisite :The dmgr and nodeagent is running.
echo.
echo For WebSphere Base/Process/ESB/Portal servers:
echo Command :ITCAM_remover.bat ^<Profile Home^> ^<Server Name^>
echo.
echo Where ^<Profile Home^> is the WebSphere profile home that has been configured by ITCAM DataCollector
echo ^<Server Name^> is the WebSphere server name that has been configured by ITCAM DataCollector
echo ====================================================================================================
goto end
:exec
call %phost%/bin/wsadmin.bat -conntype %conntype% -f removejvm.jacl %WAS_CELL% %WAS_NODE% %srvname%
if errorlevel 0 (
echo The ITCAM JVM parameters have been removed sucessfully!
)else (
echo Remove ITCAM JVM parameters failed!
)
:end
@REM Remove JVM parameter if WAS has been configured by ITCAMDC
@REM Syntax:
@REM For WebSphere ND servers:
@REM Command: ITCAM_remover.bat <Profile Home> <Server Name> SOAP
@REM Prerequisite: The dmgr and nodeagent is running.
@REM For WebSphere Base/Process/ESB/Portal servers:
@REM Command: ITCAM_remover.bat <Profile Home> <Server Name>
@REM Where "Profile Home" is the WebSphere profile home that has been configured by ITCAM DataCollector
@REM "Server Name" is the WebSphere server name that has been configured by ITCAM DataCollector
@REM ----------------------------------------------------------------------------------
@echo off
set phost=%1
set srvname=%2
if "%3"=="" (
set conntype=NONE
)else (
set conntype=%3
)
if "%phost%"=="" goto spec
if "%srvname%"=="" goto spec
set /p rmOrNot=This tool will remove ITCAM JVM paramters form this WAS instance?Are you sure?[Y,N]?
if /i %rmOrNot%==Y goto rm
if /i not %rmOrNot%==y goto end
:rm
@REM echo %phost%
@REM echo %srvname%
@REM echo %conntype%
call %phost%/bin/setupCmdLine.bat
@REM echo %WAS_CELL%
@REM echo %WAS_NODE%
goto exec
:spec
echo ====================================================================================================
echo For WebSphere ND servers:
echo Command :ITCAM_remover.bat ^<Profile Home^> ^<Server Name^> SOAP
echo Prerequisite :The dmgr and nodeagent is running.
echo.
echo For WebSphere Base/Process/ESB/Portal servers:
echo Command :ITCAM_remover.bat ^<Profile Home^> ^<Server Name^>
echo.
echo Where ^<Profile Home^> is the WebSphere profile home that has been configured by ITCAM DataCollector
echo ^<Server Name^> is the WebSphere server name that has been configured by ITCAM DataCollector
echo ====================================================================================================
goto end
:exec
call %phost%/bin/wsadmin.bat -conntype %conntype% -f removejvm.jacl %WAS_CELL% %WAS_NODE% %srvname%
if errorlevel 0 (
echo The ITCAM JVM parameters have been removed sucessfully!
)else (
echo Remove ITCAM JVM parameters failed!
)
:end
相关文章推荐
- bat批处理文件的一个例子
- 一个windows下的批处理文件
- Windows下通过bat批处理文件和vbs脚本实现守护进程
- 一个简单但详细的解释Windows文件映射读取数据文件的例子
- Windows中启动和关闭Oracle服务的x.bat批处理文件
- windows下bat批处理文件语法 2015-07-27 11:25 8人阅读 评论(0) 收藏
- windows服务,安装、启动、停止,配置,一个批处理文件搞定
- Windows中启动和关闭Oracle服务的x.bat批处理文件
- 王者荣耀——bat批处理文件,自动刷金币版(脱胎于30行Python代码刷金币版),Windows双击即可运行!
- windows下bat批处理文件语法
- Windows批处理文件(.bat文件)
- Windows下批处理文件(.bat)的使用
- windows bat 批处理文件简单实用
- 如何用批处理文件(.bat)停止或启动windows的服务
- 一个BAT批处理文件的问题
- Windows运行bat批处理文件时隐藏cmd命令提示符窗口的方法
- 如何在一个bat批处理文件中调用另一个bat批处理文件?
- Windows垃圾文件清理(批处理BAT清理垃圾文件)
- Windows下批处理文件(.bat)的使用