webspherewebsphere-7ibm-was

How to terminate websphere app server instance from wsadmin?


I have a jython script which stops and starts a websphere application server v7 instance. I normally use AdminControl.stopServer command for the stopping, but sometimes the instance gets hung up, and the request thread times out. Then I have to terminate the instance from the web console. Is there a way to make the instance "terminate" immediately, rather than wait for a graceful stop ? I basically want the web console terminate button functionality in wsadmn.


Solution

  • Command assistance says:

    AdminControl.invoke('WebSphere:name=NodeAgent,process=nodeagent,platform=common,node=node1,diagnosticProvider=true,version=8.5.5.2,type=NodeAgent,mbeanIdentifier=NodeAgent,cell=ndcell,spec=1.0', 'terminate', '[server1]', '[java.lang.String]')