Troubleshooting
Problem
How do I list enterprise application status using wsadmin script?
Resolving The Problem
1. To list all Enterprise Applications
- $AdminApp list
2. In a federated environment, if nodeagent is not running, then all application status is unavailable on all servers on this node
- set nodeagent_status
[$AdminControl queryNames cell=myCell,node=myNode,server=nodeagent,*]
if {[llength $nodeagent_status] != 0}
{
puts "nodeagent is running"
}
else
puts "nodeagent is not running, all application status is not available"
3. In a federated environment, if nodeagent is running, but Application Server not running, then application status is unavailable on that Application Server
- set server_status
[$AdminControl queryNames cell=myCell,node=myNode, server=myServer,*]
if {[llength $server_status] != 0}
{
puts "server $server_status is running"
}
else
puts "server $server_status is not running, all application status is not available"
Make sure the nodeagent is running using step 2 above
Make sure the Application Server is running using step 3 above
- set myRunningApp [$AdminControl queryNames type,Application,name=myApp,*]
if {[llength $myRunningApp] != 0}
{
puts "App myApp is started"
}
else
puts "App myApp is not running"
5. Start or stop application
- set appManager [$AdminControl querynames cell=myCell,node=myNode,
type=ApplicationManager,process=myServer,*]
AdminControl invoke $appManager stopApplication myApp
AdminControl invoke $appManager startApplication myApp
[{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Administrative Scripting Tools (for example: wsadmin or ANT)","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF012","label":"IBM i"}],"Version":"5.1;5.1.1","Edition":"Network Deployment","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSNVBF","label":"Runtimes for Java Technology"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Java SDK","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]
Was this topic helpful?
Document Information
Modified date:
15 June 2018
UID
swg21207255