From 5d539d9a8fa1f6d3de6638a223f6f079145f6f8f Mon Sep 17 00:00:00 2001 From: daniceexi Date: Mon, 27 Jun 2011 15:10:15 +0000 Subject: [PATCH] code drop for ffo support git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9960 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/PPCenergy.pm | 14 +++++- perl-xCAT/xCAT/Usage.pm | 4 +- xCAT-client/pods/man1/renergy.1.pod | 69 +++++++++++++++++++++++++++-- 3 files changed, 80 insertions(+), 7 deletions(-) diff --git a/perl-xCAT/xCAT/PPCenergy.pm b/perl-xCAT/xCAT/PPCenergy.pm index a62bdb5fb..f357083d1 100644 --- a/perl-xCAT/xCAT/PPCenergy.pm +++ b/perl-xCAT/xCAT/PPCenergy.pm @@ -22,6 +22,13 @@ use xCAT::DBobjUtils; 'CPUspeed' => 1, 'syssbpower' => 1, 'sysIPLtime' => 1, +# for FFO, only supported when communicating to fsp directly +'ffoMin' => 1, +'ffoVmin' => 1, +'ffoTurbo' => 1, +'ffoNorm' => 1, +'fsavingstatus' => 1, +'ffovalue' => 1, ); %::SET_ATTRS = ( @@ -30,6 +37,9 @@ use xCAT::DBobjUtils; 'cappingstatus' => 1, 'cappingwatt' => 1, 'cappingperc' => 1, +# for FFO +'fsavingstatus' => 1, +'ffovalue' => 1, ); $::CIM_CLIENT_PATH = "$::XCATROOT/sbin/xCAT_cim_client"; @@ -84,7 +94,7 @@ sub parse_args { return (&usage()); } - if ($set_attr eq "savingstatus" + if (($set_attr eq "savingstatus" || $set_attr eq "fsavingstatus") && ($set_value ne "on" && $set_value ne "off")) { return (&usage()); } elsif ($set_attr eq "dsavingstatus" @@ -95,7 +105,7 @@ sub parse_args { && ($set_value ne "on" && $set_value ne "off")) { return (&usage()); } elsif ( ($set_attr eq "cappingwatt" - || $set_attr eq "cappingperc") + || $set_attr eq "cappingperc" || $set_attr eq "ffovalue") && $set_value =~ /\D/) { return (&usage()); } diff --git a/perl-xCAT/xCAT/Usage.pm b/perl-xCAT/xCAT/Usage.pm index 73a8a7de4..e7aec345d 100644 --- a/perl-xCAT/xCAT/Usage.pm +++ b/perl-xCAT/xCAT/Usage.pm @@ -240,8 +240,8 @@ my %usage = ( renergy noderange [-V] { {savingstatus}={on | off} | {cappingstatus}={on | off} | {cappingwatt}=watt | {cappingperc}=percentage } Power 7 server specific : - renergy noderange [-V] { all | { [savingstatus] [dsavingstatus] [cappingstatus] [cappingmaxmin] [cappingvalue] [cappingsoftmin] [averageAC] [averageDC] [ambienttemp] [exhausttemp] [CPUspeed] [syssbpower] [sysIPLtime] } } - renergy noderange [-V] { {savingstatus}={on | off} | {dsavingstatus}={on-norm | on-maxp | off} | {cappingstatus}={on | off} | {cappingwatt}=watt | {cappingperc}=percentage } + renergy noderange [-V] { all | { [savingstatus] [dsavingstatus] [cappingstatus] [cappingmaxmin] [cappingvalue] [cappingsoftmin] [averageAC] [averageDC] [ambienttemp] [exhausttemp] [CPUspeed] [syssbpower] [sysIPLtime] [fsavingstatus] [ffoMin] [ffoVmin] [ffoTurbo] [ffoNorm] [ffovalue] } } + renergy noderange [-V] { {savingstatus}={on | off} | {dsavingstatus}={on-norm | on-maxp | off} | {fsavingstatus}={on | off} | {ffovalue}=MHZ | {cappingstatus}={on | off} | {cappingwatt}=watt | {cappingperc}=percentage } Blade specific : renergy noderange [-V] { all | pd1all | pd2all | { [pd1status] [pd2status] [pd1policy] [pd2policy] [pd1powermodule1] [pd1powermodule2] [pd2powermodule1] [pd2powermodule2] [pd1avaiablepower] [pd2avaiablepower] [pd1reservedpower] [pd2reservedpower] [pd1remainpower] [pd2remainpower] [pd1inusedpower] [pd2inusedpower] [availableDC] [averageAC] [thermaloutput] [ambienttemp] [mmtemp] } } diff --git a/xCAT-client/pods/man1/renergy.1.pod b/xCAT-client/pods/man1/renergy.1.pod index f764a379e..2c7986dee 100644 --- a/xCAT-client/pods/man1/renergy.1.pod +++ b/xCAT-client/pods/man1/renergy.1.pod @@ -29,10 +29,12 @@ B B I [-V] { all | [savingstatus] [dsavingstatus] [cappingstatus] [cappingmaxmin] [cappingvalue] [cappingsoftmin] [averageAC] [averageDC] [ambienttemp] [exhausttemp] [CPUspeed] -[syssbpower] [sysIPLtime] } +[syssbpower] [sysIPLtime] [fsavingstatus] [ffoMin] [ffoVmin] +[ffoTurbo] [ffoNorm] [ffovalue]} B I [-V] { savingstatus={on | off} -| dsavingstatus={on-norm | on-maxp | off} +| dsavingstatus={on-norm | on-maxp | off} +| fsavingstatus={on | off} | ffovalue=MHZ | cappingstatus={on | off} | cappingwatt=watt | cappingperc=percentage } @@ -142,7 +144,7 @@ B: savingstatus =back -B<8233-E8B>, B<8236-E8C>, B<9125-F2C> +B<8233-E8B>, B<8236-E8C> =over 4 @@ -157,6 +159,22 @@ cappingperc =back +B<9125-F2C> + +=over 4 + +Supported attributes: + +B: savingstatus,dsavingstatus,cappingstatus,cappingmin, +cappingmax,cappingvalue,cappingsoftmin,averageAC,averageDC, +ambienttemp,exhausttemp,CPUspeed,syssbpower,sysIPLtime, +fsavingstatus,ffoMin,ffoVmin,ffoTurbo,ffoNorm,ffovalue + +B: savingstatus,dsavingstatus,cappingstatus,cappingwatt, +cappingperc,fsavingstatus,ffovalue + +=back + =back Note: @@ -331,6 +349,51 @@ B is in turn off status. Query the current exhaust temperature. (Unit is centigrade) +=item B + +Query the minimum cpu frequency which can be set for FFO. (Fixed +Frequency Override) + +=item B + +Query the maximum cpu frequency which can be set for FFO. + +=item B + +Query the advertised maximum cpu frequency (selling point). + +=item B + +Query the minimum cpu frequency which can be set for dropping down +the voltage to save power. That means when you drop the cpu +frequency from the ffoVmin to ffoVmin, the voltage won't change, +then there's no obvious power to be saved. + +=item B + +Query the current value of FFO. + +=item B=B + +Set the current value of FFO. The valid value of ffovalue should +be between the ffoMin and ffoNorm. + +The ffovalue setting operation needs about 1 minute to take effect. + +=item B + +Query the status of FFO. The result should be 'on' or 'off'. +'on' - enable; 'off' - disable. + +=item B={B │ B} + +Set the status of FFO. The value must be 'on' or 'off'. + +'on' - enable. It will take effect only when the B +has been set to a valid value. + +'off' -disable. It will take effect immediately. + =item B Query the maximum processor frequency. (Unit is MHz)