Forum Discussion
Sep 29, 2008
Try this out:
sub showPoolMembers()
{
my (@pool_list) = @_;
my @sortedPool = sort { lc($a) cmp lc($b) } @pool_list;
my @member_state_lists = &getPoolMemberStates(@sortedPool);
my @member_priority_lists = &getPoolPriority(@sortedPool);
print "Pool Members Enabled State\n";
print "==========================\n";
$i = 0;
for $i (0 .. scalar(@sortedPool)-1)
{
$pool = @sortedPool[ $i ];
@MemberSessionStateList = @{@member_state_lists[ $i ]};
@MemberPriorityList = @{@member_priority_lists[ $i ]};
for $j (0 .. scalar(@MemberSessionStateList)-1)
{
$MemberSessionState = @MemberSessionStateList[ $j ];
$MemberPriority = @MemberPriorityList[ $j ];
$member = $MemberSessionState->{"member"};
$address = $member->{"address"};
$port = $member->{"port"};
$session_state = $MemberSessionState->{"session_state"};
$priority = $MemberPriority->{"priority"};
print "$pool:$address:$port:$session_state:$priority\n";
}
}
}
-Joe