Forum Discussion

fxt_31120's avatar
fxt_31120
Icon for Nimbostratus rankNimbostratus
Jul 04, 2012

How to find a Virtual server by ip+port

Hi everybody, I'm looking for a Icontrol cmdlet or a tips for search if my @ip+port is already used by a Virtual server. Right now I use a combo of 2 functions but it's not efficient at all (8 to 10 min): $exist_address=$false $list_virtual_server=$ic.LocalLBVirtualServer.get_list() for ($i=0 ; $i -lt $list_virtual_server.length; $i++) { $virtual_server_spec=$ic.LocalLBVirtualServer.get_destination($list_virtual_server[$i]) $virtual_server_address=$virtual_server_spec[0].address $virtual_server_port=$virtual_server_spec[0].port if (($virtual_server_address -eq $ServerAddress) -and ($virtual_server_port -eq $ServerPort)) { $exist_address=$true return $exist_address } } return $exist_address I know it's possible to be more efficient because the web interface provide this in 3-4 seconds in "Local Traffic" > "Network Map" > "Search" Any help ? :) Ps: Sorry for my english
No RepliesBe the first to reply