Frank_J_104756
Nov 04, 2009Historic F5 Account
comparing variable values
I have 4 counter variables that are set. I've incremented them based on the of times certain strings are seen in an array. I now need to compare these 4 different variables so that I can find out which has the lowest value
foreach lbentry [array names ::sessionlbarray] {
switch $lbentry {
$server1ip {set server1lb [expr {$server1lb} + 1]}
$server2ip {set server2lb [expr {$server2lb} + 1]}
$server3ip {set server3lb [expr {$server3lb} + 1]}
$server4ip {set server4lb [expr {$server4lb} + 1]}
}
}
what is the easiest way to compare the variables server1lb, server2lb, server3lb, and server4lb so that I can find the one w/ the lowest value ?