Handy wsadmin commands:
I feel jacl is much easier than jython :) . Hence here are the jacl commands
To list the installed applications:
/opt/websphere/profile1/bin/wsadmin.sh -conntype SOAP -port 8880 -username wsadmin -c '$AdminApp list'
To Uninstall the Application:
/opt/websphere/profile1/bin/wsadmin.sh -conntype SOAP -port 8880 -username wsadmin -c '$AdminApp uninstall application-xyz'
To backup the existing application:
/opt/websphere/profile1/bin/wsadmin.sh -conntype SOAP -port 8880 -username wsadmin -c '$AdminApp export utilities /tmp/utilities_backup.ear'
To Stop the application:
/opt/websphere/profile1/bin/wsadmin.sh -conntype SOAP -port 8880 -username wsadmin
wsadmin>set appManager [$AdminControl queryNames type=ApplicationManager,*]
WebSphere:name=ApplicationManager,process=xyz,platform=dynamicproxy,node=xyz,version=6.1.0.0,type=ApplicationManager,mbeanIdentifier=ApplicationManager,cell=xyz,spec=1.0
wsadmin>$AdminApp list
x1
x2
wsadmin>$AdminControl invoke $appManager stopApplication x1
To Start the application:
/opt/websphere/profile1/bin/wsadmin.sh -conntype SOAP -port 8880 -username wsadmin
wsadmin>set appManager [$AdminControl queryNames type=ApplicationManager,*]
WebSphere:name=ApplicationManager,process=xyz,platform=dynamicproxy,node=xyz,version=6.1.0.0,type=ApplicationManager,mbeanIdentifier=ApplicationManager,cell=xyz,spec=1.0
wsadmin>$AdminApp list
x1
x2
wsadmin>$AdminControl invoke $appManager startApplication x1
To Restart all the application:
Run this command to stop all of the running applications:
foreach app $apps {set appName [$AdminControl getAttribute $app name];
$AdminControl invoke $appManager stopApplication $appName}
Run this command to start all of the running applications:
foreach app $apps {set appName [$AdminControl getAttribute $app name];
$AdminControl invoke $appManager startApplication $appName}
No comments:
Post a Comment