?> <p/> <?php $CPUTemps = array(); $Sensor = 4; for ($i = 0; $i < 4; $i++) { $thisTempSensor = "LM-SENSORS-MIB::lmTempSensorsValue." . $Sensor; $thisTempSNMP = snmp3_get('localhost', $snmpUser, 'authPriv', 'MD5', $snmpPass, 'DES', $snmpPass, $thisTempSensor); $CPUTemps[$i] = preg_replace('/Gauge32\\: /', '', $thisTempSNMP); $Sensor++; } $CPUCoreNo = 1; foreach ($CPUTemps as $thisTemp) { $thisTemp = round(0.9 * Conv2TF($thisTemp / 1000), 0); $thisColor = AutoColorScale($thisTemp, 158, 60, NULL); echo "<button class='UButton' style='background-color: " . $thisColor . ";'>Core " . $CPUCoreNo . "<br/>" . $thisTemp . " F</button>"; $CPUCoreNo++; } ?> <p/> <?php $this_MemPhysSize = snmp3_get('localhost', $snmpUser, 'authPriv', 'MD5', $snmpPass, 'DES', $snmpPass, "HOST-RESOURCES-MIB::hrStorageSize.1"); $this_MemPhysUsed = snmp3_get('localhost', $snmpUser, 'authPriv', 'MD5', $snmpPass, 'DES', $snmpPass, "HOST-RESOURCES-MIB::hrStorageUsed.1"); $this_MemBuffUsed = snmp3_get('localhost', $snmpUser, 'authPriv', 'MD5', $snmpPass, 'DES', $snmpPass, "HOST-RESOURCES-MIB::hrStorageUsed.6"); $this_MemCachUsed = snmp3_get('localhost', $snmpUser, 'authPriv', 'MD5', $snmpPass, 'DES', $snmpPass, "HOST-RESOURCES-MIB::hrStorageUsed.7"); $this_MemPhysSize = preg_replace('/INTEGER\\: /', '', $this_MemPhysSize); $this_MemPhysUsed = preg_replace('/INTEGER\\: /', '', $this_MemPhysUsed);
$OTime[] = $row_SysDB['WalkTime']; $DynVar[] = round(0.9 * Conv2TF($row_SysDB['TempCPU'] / 1000), 0); $DynVarDef = "CPU"; $DynVar2[] = round(0.9 * Conv2TF($row_SysDB['TempCase'] / 1000), 0); $DynVarDef2 = "Case"; $serieSettings2 = $serieSettingsS; $DynVar3[] = round(0.9 * Conv2TF($row_SysDB['TempCore1'] / 1000), 0); $DynVarDef3 = "Core 1"; $serieSettings3 = $serieSettingsS; $DynVar4[] = round(0.9 * Conv2TF($row_SysDB['TempCore2'] / 1000), 0); $DynVarDef4 = "Core 2"; $serieSettings4 = $serieSettingsS; $DynVar5[] = round(0.9 * Conv2TF($row_SysDB['TempCore3'] / 1000), 0); $DynVarDef5 = "Core 3"; $serieSettings5 = $serieSettingsS; $DynVar6[] = round(0.9 * Conv2TF($row_SysDB['TempCore4'] / 1000), 0); $DynVarDef6 = "Core 4"; $serieSettings6 = $serieSettingsS; } $DynVarUnits = "degrees F"; break; } $MyData = new pData(); if (isset($DynVar2)) { $MyData->addPoints($DynVar2, $DynVarDef2); $MyData->setSerieWeight($DynVarDef2, $chWeight / 3); $MyData->setPalette($DynVarDef2, $serieSettings2); } if (isset($DynVar3)) { $MyData->addPoints($DynVar3, $DynVarDef3); $MyData->setSerieWeight($DynVarDef3, $chWeight / 3);