wsadmin: jacl: AdminApp list <scope?> WebSphere 5.x

1.8k views Asked by At

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

2

There are 2 answers

1
m1k3y3 On BEST ANSWER

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.

0
Brett Kail On

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