Reputation: 2788
I am trying to list applications installed on particular server below command works fine on WAS 6.x and 7 however I cannot make the same on WAS 5.x
wsadmin> $AdminApp list /WebSphere:cell=cell01,node=node01,server=server1/
Also, $AdminApp help list does not show optional scope parameter.
Could you please advise ?
Thanks
Upvotes: 0
Views: 1828
Reputation: 33936
I don't have access to v5 right now to test, but something like this might work:
proc listAppsByTarget {target} {
global AdminApp
set result []
regsub -all / $target "" target
foreach app [$AdminApp list] {
foreach line [split [$AdminApp view $app -MapModulesToServers] "\r\n"] {
if [regexp "^Server: ${target}($|,)" $line] {
lappend result $app
break
}
}
}
return $result
}
This will print any application that has a module targetted to the specified server. Used like this:
wsadmin>listAppsByServerTarget /WebSphere:cell=cell,node=node,server=server1/
DefaultApplication
Upvotes: 1
Reputation: 2788
I found the way, however it's not the same output, it needs to be parsed to get the details.
wsadmin > $AdminControl queryName type=Application,node=node01,process=server1
In case there is another way please let me know.
Upvotes: 0