-Add support for renergy relhistogram if IBM::EnergyManager is present

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4999 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2010-01-20 21:38:57 +00:00
parent af7974b520
commit 1884735750

View File

@ -4518,6 +4518,15 @@ sub renergy {
my $capenabled = $iem->capping_enabled();
push @output,"cappingstatus: ".($capenabled ? "on" : "off");
}
if ($directive =~ /relhistogram/) {
my $entry;
$iem->prep_retrieve_histogram();
execute_iem_commands($iem);
my @histdata = $iem->extract_relative_histogram;
foreach (sort { $a <=> $b } keys %{$histdata[0]}) {
push @output,"$_: ".$histdata[0]->{$_};
}
}
}
return (0,@output);
}