-
Notifications
You must be signed in to change notification settings - Fork 446
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
5050
committed
Jan 11, 2015
1 parent
6883fb1
commit 64ff86a
Showing
103 changed files
with
3,505 additions
and
1,107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
[Android] | ||
1.0="Apple Pie" | ||
1.1="Banana Bread" | ||
1.5="Cupcake" | ||
1.6="Donut" | ||
2.0="Eclair" | ||
2.1="Eclair" | ||
2.2="Froyo" | ||
2.3="Gingerbread" | ||
3.0="Honeycomb" | ||
3.1="Honeycomb" | ||
3.2="Honeycomb" | ||
4.0="Ice Cream Sandwich" | ||
4.1="Jelly Bean" | ||
4.2="Jelly Bean" | ||
4.3="Jelly Bean" | ||
4.4="KitKat" | ||
5.0="Lollipop" | ||
|
||
[OS X] | ||
10.0="Cheetah" | ||
10.1="Puma" | ||
10.2="Jaguar" | ||
10.3="Panther" | ||
10.4="Tiger" | ||
10.5="Leopard" | ||
10.6="Snow Leopard" | ||
10.7="Lion" | ||
10.8="Mountain Lion" | ||
10.9="Mavericks" | ||
10.10="Yosemite" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,177 @@ | ||
<?php | ||
/** | ||
* freeipmi sensor class | ||
* | ||
* PHP version 5 | ||
* | ||
* @category PHP | ||
* @package PSI_Sensor | ||
* @author Michael Cramer <[email protected]> | ||
* @copyright 2009 phpSysInfo | ||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License | ||
* @version SVN: $Id: class.freeipmi.inc.php 661 2012-08-27 11:26:39Z namiltd $ | ||
* @link http://phpsysinfo.sourceforge.net | ||
*/ | ||
/** | ||
* getting information from ipmi-sensors | ||
* | ||
* @category PHP | ||
* @package PSI_Sensor | ||
* @author Michael Cramer <[email protected]> | ||
* @copyright 2009 phpSysInfo | ||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License | ||
* @version Release: 3.0 | ||
* @link http://phpsysinfo.sourceforge.net | ||
*/ | ||
class FreeIPMI extends Sensors | ||
{ | ||
/** | ||
* content to parse | ||
* | ||
* @var array | ||
*/ | ||
private $_lines = array(); | ||
|
||
/** | ||
* fill the private content var through tcp or file access | ||
*/ | ||
public function __construct() | ||
{ | ||
parent::__construct(); | ||
switch (strtolower(PSI_SENSOR_ACCESS)) { | ||
case 'command': | ||
CommonFunctions::executeProgram('ipmi-sensors', '--output-sensor-thresholds', $lines); | ||
$this->_lines = preg_split("/\n/", $lines, -1, PREG_SPLIT_NO_EMPTY); | ||
break; | ||
case 'file': | ||
if (CommonFunctions::rfts(APP_ROOT.'/data/freeipmi.txt', $lines)) { | ||
$this->_lines = preg_split("/\n/", $lines, -1, PREG_SPLIT_NO_EMPTY); | ||
} | ||
break; | ||
default: | ||
$this->error->addConfigError('__construct()', 'PSI_SENSOR_ACCESS'); | ||
break; | ||
} | ||
} | ||
|
||
/** | ||
* get temperature information | ||
* | ||
* @return void | ||
*/ | ||
private function _temperature() | ||
{ | ||
foreach ($this->_lines as $line) { | ||
$buffer = preg_split("/\s*\|\s*/", $line); | ||
if ($buffer[2] == "Temperature" && $buffer[11] != "N/A" && $buffer[4] == "C") { | ||
$dev = new SensorDevice(); | ||
$dev->setName($buffer[1]); | ||
$dev->setValue($buffer[3]); | ||
if ($buffer[9] != "N/A") $dev->setMax($buffer[9]); | ||
if ($buffer[11] != "'OK'") $dev->setEvent(trim($buffer[11],"'")); | ||
$this->mbinfo->setMbTemp($dev); | ||
} | ||
} | ||
} | ||
|
||
/** | ||
* get voltage information | ||
* | ||
* @return void | ||
*/ | ||
private function _voltage() | ||
{ | ||
foreach ($this->_lines as $line) { | ||
$buffer = preg_split("/\s*\|\s*/", $line); | ||
if ($buffer[2] == "Voltage" && $buffer[11] != "N/A" && $buffer[4] == "V") { | ||
$dev = new SensorDevice(); | ||
$dev->setName($buffer[1]); | ||
$dev->setValue($buffer[3]); | ||
if ($buffer[6] != "N/A") $dev->setMin($buffer[6]); | ||
if ($buffer[9] != "N/A") $dev->setMax($buffer[9]); | ||
if ($buffer[11] != "'OK'") $dev->setEvent(trim($buffer[11],"'")); | ||
$this->mbinfo->setMbVolt($dev); | ||
} | ||
} | ||
} | ||
|
||
/** | ||
* get fan information | ||
* | ||
* @return void | ||
*/ | ||
private function _fans() | ||
{ | ||
foreach ($this->_lines as $line) { | ||
$buffer = preg_split("/\s*\|\s*/", $line); | ||
if ($buffer[2] == "Fan" && $buffer[11] != "N/A" && $buffer[4] == "RPM") { | ||
$dev = new SensorDevice(); | ||
$dev->setName($buffer[1]); | ||
$dev->setValue($buffer[3]); | ||
if ($buffer[6] != "N/A") { | ||
$dev->setMin($buffer[6]); | ||
} elseif (($buffer[9] != "N/A") && ($buffer[9]<$buffer[3])) { //max instead min issue | ||
$dev->setMin($buffer[9]); | ||
} | ||
if ($buffer[11] != "'OK'") $dev->setEvent(trim($buffer[11],"'")); | ||
$this->mbinfo->setMbFan($dev); | ||
} | ||
} | ||
} | ||
|
||
/** | ||
* get power information | ||
* | ||
* @return void | ||
*/ | ||
private function _power() | ||
{ | ||
foreach ($this->_lines as $line) { | ||
$buffer = preg_split("/\s*\|\s*/", $line); | ||
if ($buffer[2] == "Current" && $buffer[11] != "N/A" && $buffer[4] == "W") { | ||
$dev = new SensorDevice(); | ||
$dev->setName($buffer[1]); | ||
$dev->setValue($buffer[3]); | ||
if ($buffer[9] != "N/A") $dev->setMax($buffer[9]); | ||
if ($buffer[11] != "'OK'") $dev->setEvent(trim($buffer[11],"'")); | ||
$this->mbinfo->setMbPower($dev); | ||
} | ||
} | ||
} | ||
|
||
/** | ||
* get current information | ||
* | ||
* @return void | ||
*/ | ||
private function _current() | ||
{ | ||
foreach ($this->_lines as $line) { | ||
$buffer = preg_split("/\s*\|\s*/", $line); | ||
if ($buffer[2] == "Current" && $buffer[11] != "N/A" && $buffer[4] == "A") { | ||
$dev = new SensorDevice(); | ||
$dev->setName($buffer[1]); | ||
$dev->setValue($buffer[3]); | ||
if ($buffer[9] != "N/A") $dev->setMax($buffer[9]); | ||
if ($buffer[11] != "'OK'") $dev->setEvent(trim($buffer[11],"'")); | ||
$this->mbinfo->setMbCurrent($dev); | ||
} | ||
} | ||
} | ||
|
||
/** | ||
* get the information | ||
* | ||
* @see PSI_Interface_Sensor::build() | ||
* | ||
* @return Void | ||
*/ | ||
public function build() | ||
{ | ||
$this->_temperature(); | ||
$this->_voltage(); | ||
$this->_fans(); | ||
$this->_power(); | ||
$this->_current(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.