Stop running applications on a server
The following example stops all running applications on a server:
- Identify the application manager MBean for the server where the application resides, and assign it to the appManager variable.
This command returns the application manager MBean.set appManager [$AdminControl queryNames cell=cellname,node=nodename,type=ApplicationManager,process=servername,*]Example output:
WebSphere:cell=cellname,name=ApplicationManager,mbeanIdentifier=ApplicationManager,type=ApplicationManager,node=nodename,process=servername- Query the running applications belonging to this server and assign the result to the apps variable.
This command returns a list of application MBeans.set apps [$AdminControl queryNames cell=cellname,node=nodename,type=Application,process=servername,*]Example output:
WebSphere:cell=cellname,name=adminconsole,mbeanIdentifier=deployment.xml#ApplicationDeployment_1,type=Application,node=nodename,Server=servername,process=servername,J2EEName=adminconsole WebSphere:cell=cellname,name=filetransfer,mbeanIdentifier=deployment.xml#ApplicationDeployment_1,type=Application,node=nodename,Server=servername,process=servername,J2EEName=filetransfer- Stop all the running applications.
This command stops all the running applications by invoking the stopApplication operation on the MBean, passing in the application name to stop.foreach app $apps { set appName [$AdminControl getAttribute $app name] $AdminControl invoke $appManager stopApplication $appName }
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.