0

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

m1k3y3
  • 2,762
  • 8
  • 39
  • 68

2 Answers2

1

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
Brett Kail
  • 33,593
  • 2
  • 85
  • 90
0

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.

m1k3y3
  • 2,762
  • 8
  • 39
  • 68
  • Note that AdminControl only works in connected mode (when the server is running), but otherwise, this probably gives the data you're looking for. – Brett Kail Dec 15 '11 at 15:25