Forum Discussion
mariogolf_57851
Dec 20, 2010Nimbostratus
System::SystemInfo::get_fan_metrics
Can you help me formatting the output returned from this call please?
----------------------------------------------------------------------------
sub get_fan_metrics
------------...
mariogolf_57851
Dec 22, 2010Nimbostratus
----------------------------------------------------------------------------
sub get_fan_metrics
----------------------------------------------------------------------------
sub get_fan_metrics()
{
$soapResponse = $SystemInfo->get_fan_metrics();
$PlatformFans = $soapResponse->result;
$TimeStamp=$PlatformFans->{'time_stamp'};
$FanMetric=$PlatformFans->{'fans'};
@AoA=$FanMetric;
for $i ( 0 .. $AoA ) {
for $j ( 0 .. ${$AoA[$i]} ) {
$FanIndex = $AoA[$i][$j][0];
for my $Index (sort keys %{$FanIndex}) {
print $Index . " " . $FanIndex->{"$Index"} . "\n";
}
$FanState = $AoA[$i][$j][1];
for my $State (sort keys %{$FanState}) {
print $State . " " . $FanState->{"$State"} . "\n";
}
$FanSpeed = $AoA[$i][$j][2];
for my $Speed (sort keys %{$FanSpeed}) {
print $Speed . " " . $FanSpeed->{"$Speed"} . "\n";
}
}
}
print "The statistics were gathered: [";
print $TimeStamp->{'year'};
print $TimeStamp->{'month'};
print $TimeStamp->{'day'};
print $TimeStamp->{'hour'};
print $TimeStamp->{'minute'};
print $TimeStamp->{'second'};
print "]\n";
}
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects