From 188473575094abd1bd679f398675aa371f647b65 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Wed, 20 Jan 2010 21:38:57 +0000 Subject: [PATCH] -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 --- xCAT-server/lib/xcat/plugins/ipmi.pm.2 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/ipmi.pm.2 b/xCAT-server/lib/xcat/plugins/ipmi.pm.2 index 480baa173..fde107267 100644 --- a/xCAT-server/lib/xcat/plugins/ipmi.pm.2 +++ b/xCAT-server/lib/xcat/plugins/ipmi.pm.2 @@ -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); }