Skip to content

Commit

Permalink
Short circuiting the dcStats for sensors until I get the conversion c…
Browse files Browse the repository at this point in the history
…ompleted.
  • Loading branch information
samilliken committed May 17, 2015
1 parent 6b57b1e commit a1c0267
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions infrastructure.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -675,13 +675,15 @@ function GetDCStatistics(){
$sql="SELECT AVG(NULLIF(a.Temp, 0)) as AvgTemp FROM fac_CabinetTemps a, fac_Cabinet b
WHERE a.CabinetID=b.CabinetID AND
b.DataCenterID=$this->DataCenterID;";
$dcStats["AvgTemp"]=($test=round($this->query($sql)->fetchColumn()))?$test:0;

// $dcStats["AvgTemp"]=($test=round($this->query($sql)->fetchColumn()))?$test:0;
$dcStats["AvgTemp"]=0;

$sql="SELECT AVG(NULLIF(a.Humidity, 0)) as AvgHumidity FROM fac_CabinetTemps a, fac_Cabinet b
WHERE a.CabinetID=b.CabinetID AND
b.DataCenterID=$this->DataCenterID;";
$dcStats["AvgHumidity"]=($test=round($this->query($sql)->fetchColumn()))?$test:0;

// $dcStats["AvgHumidity"]=($test=round($this->query($sql)->fetchColumn()))?$test:0;
$dcStats["AvgHumidity"]=0;

$pdu=new PowerDistribution();
$dcStats["MeasuredWatts"]=$pdu->GetWattageByDC($this->DataCenterID);

Expand Down

0 comments on commit a1c0267

Please sign in to comment.