|
@@ 36-42 (lines=7) @@
|
| 33 |
|
*/ |
| 34 |
|
private function _temperature() |
| 35 |
|
{ |
| 36 |
|
if (CommonFunctions::executeProgram("/Apps/opt/bin/snmpwalk", "-Ona -c public -v 1 -r 1 127.0.0.1 .1.3.6.1.4.1.24681.1.2.5.0", $buffer, PSI_DEBUG) |
| 37 |
|
&& preg_match('/^[\.\d]+ = STRING:\s\"?(\d+)\sC/', $buffer, $data)) { |
| 38 |
|
$dev = new SensorDevice(); |
| 39 |
|
$dev->setName("CPU"); |
| 40 |
|
$dev->setValue($data[1]); |
| 41 |
|
$this->mbinfo->setMbTemp($dev); |
| 42 |
|
} |
| 43 |
|
|
| 44 |
|
if (CommonFunctions::executeProgram("/Apps/opt/bin/snmpwalk", "-Ona -c public -v 1 -r 1 127.0.0.1 .1.3.6.1.4.1.24681.1.2.6.0", $buffer, PSI_DEBUG) |
| 45 |
|
&& preg_match('/^[\.\d]+ = STRING:\s\"?(\d+)\sC/', $buffer, $data)) { |
|
@@ 44-50 (lines=7) @@
|
| 41 |
|
$this->mbinfo->setMbTemp($dev); |
| 42 |
|
} |
| 43 |
|
|
| 44 |
|
if (CommonFunctions::executeProgram("/Apps/opt/bin/snmpwalk", "-Ona -c public -v 1 -r 1 127.0.0.1 .1.3.6.1.4.1.24681.1.2.6.0", $buffer, PSI_DEBUG) |
| 45 |
|
&& preg_match('/^[\.\d]+ = STRING:\s\"?(\d+)\sC/', $buffer, $data)) { |
| 46 |
|
$dev = new SensorDevice(); |
| 47 |
|
$dev->setName("System"); |
| 48 |
|
$dev->setValue($data[1]); |
| 49 |
|
$this->mbinfo->setMbTemp($dev); |
| 50 |
|
} |
| 51 |
|
|
| 52 |
|
if (CommonFunctions::executeProgram("/Apps/opt/bin/snmpwalk", "-Ona -c public -v 1 -r 1 127.0.0.1 .1.3.6.1.4.1.24681.1.2.11.1.3", $buffer, PSI_DEBUG)) { |
| 53 |
|
$lines = preg_split('/\r?\n/', $buffer); |