获取F5成员并发数

use BigIP::iControl;
use Data::Dumper;
my $ic = BigIP::iControl->new(
server => '10.3.400.2',
username => 'vv',
password => 'vv',
port => '443',
proto => 'https'
);
##获取pool member 统计信息
#Returns a hash containing all pool member statistics for the specified pool. The hash has the following structure;
#返回指定pool 的所有成员的统计信息,类型为hash
my $pool='/Common/ESB_pool';
my %stats = $ic->get_pool_member_statistics_stringified($pool);
print %stats;
print "
";
print '--------------------------------'."
";
foreach $key1 (sort keys %stats) {
   #10.2.229.106:0=>HASH(0x2a02f28)
   print  "$key1=>$stats{$key1}
";
   my %h=%{$stats{$key1}};
   foreach $key2 (keys %h){
      #print  "$key2=>$h{$key2}
";
      #stats=>HASH(0x3e25230
       if ($key2 eq 'stats'){ 
             my %h2=%{$h{$key2}};
             foreach $key3 (keys %h2){
               print  "$key1=>$key3=>$h2{$key3}
";
             }
         }
       else{print  "$key1=>$key2=>$h{$key2}
";};
      
   };
};

原文地址:https://www.cnblogs.com/hzcya1995/p/13348974.html