IBM WebSphere - List application servers, node agents, deployment managers, web servers using wsadmin

by
Jeremy Canfield |
Updated: July 14 2022
| IBM WebSphere articles
If you are not familiar with wsadmin.sh (Linux) / wsadmin.bat (Windows), check out our Getting Started article.
The following wsadmin AdminTask command can be used to list the application servers, node agents, deployment managers, and web servers. This example uses the jython language.
AdminTask.listServers()
Which should return something like this.
AppSrv01(cells/myCell01/nodes/myNode01/servers/AppSrv01|server.xml)
AppSrv02(cells/myCell01/nodes/myNode01/servers/AppSrv02|server.xml)
nodeagent(cells/myCell01/nodes/myNode01/servers/nodeagent|server.xml)
dmgr(cells/myCell01/nodes/myMgr01/servers/dmgr|server.xml)
WebSrv01(cells/myCell01/nodes/myWeb01/servers/WebSrv01|server.xml)
-serverType APPLICATION_SERVER can be used to only list the application servers.
AdminTask.listServers('[-serverType APPLICATION_SERVER]')
-serverType NODE_AGENT can be used to only list the node agents.
AdminTask.listServers('[-serverType NODE_AGENT]')
Did you find this article helpful?
If so, consider buying me a coffee over at