diff --git a/html/pages/device/health/hrprocessors.inc.php b/html/pages/device/health/hrprocessors.inc.php index deb61d2d3..7702c7127 100644 --- a/html/pages/device/health/hrprocessors.inc.php +++ b/html/pages/device/health/hrprocessors.inc.php @@ -13,24 +13,24 @@ $proc_popup .= "', RIGHT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\""; if($proc['cpuCPMTotal5minRev'] > '60') { $proc_colour='#cc0000'; } else { $proc_colour='#0000cc'; } - echo("" . $proc['entPhysicalDescr'] . " - - " . $proc['hrProcessorTotal5minRev'] . "% + echo("" . $proc['hrDeviceDescr'] . " + + " . $proc['hrProcessorLoad'] . "% "); echo(""); $daily_graph = "graph.php?id=" . $proc['hrDevice_id'] . "&type=hrProcessor&from=$day&to=$now&width=211&height=100"; - $daily_url = "graph.php?id=" . $proc['hrDevice_id'] . "&type=hrProcessor&from=$day&to=$now&width=400&height=150"; + $daily_url = "graph.php?id=" . $proc['hrDevice_id'] . "&type=hrProcessor&from=$day&to=$now&width=400&height=150"; $weekly_graph = "graph.php?id=" . $proc['hrDevice_id'] . "&type=hrProcessor&from=$week&to=$now&width=211&height=100"; - $weekly_url = "graph.php?id=" . $proc['hrDevice_id'] . "&type=hrProcessor&from=$week&to=$now&width=400&height=150"; + $weekly_url = "graph.php?id=" . $proc['hrDevice_id'] . "&type=hrProcessor&from=$week&to=$now&width=400&height=150"; $monthly_graph = "graph.php?id=" . $proc['hrDevice_id'] . "&type=hrProcessor&from=$month&to=$now&width=211&height=100"; - $monthly_url = "graph.php?id=" . $proc['hrDevice_id'] . "&type=hrProcessor&from=$month&to=$now&width=400&height=150"; + $monthly_url = "graph.php?id=" . $proc['hrDevice_id'] . "&type=hrProcessor&from=$month&to=$now&width=400&height=150"; $yearly_graph = "graph.php?id=" . $proc['hrDevice_id'] . "&type=hrProcessor&from=$year&to=$now&width=211&height=100"; - $yearly_url = "graph.php?id=" . $proc['hrDevice_id'] . "&type=hrProcessor&from=$year&to=$now&width=400&height=150"; + $yearly_url = "graph.php?id=" . $proc['hrDevice_id'] . "&type=hrProcessor&from=$year&to=$now&width=400&height=150"; echo("', LEFT);\" onmouseout=\"return nd();\"> "); @@ -42,7 +42,6 @@ "); echo(""); - $i++; } echo(""); diff --git a/includes/discovery/hr-device.inc.php b/includes/discovery/hr-device.inc.php index 73bfa917e..41f131779 100755 --- a/includes/discovery/hr-device.inc.php +++ b/includes/discovery/hr-device.inc.php @@ -4,7 +4,7 @@ echo("hrDevice : "); $hrDevice_oids = array('hrDeviceIndex','hrDeviceType','hrDeviceDescr','hrDeviceStatus','hrDeviceErrors','hrProcessorLoad'); -foreach ($hrDevice_oids as $oid) { echo("$oid "); $hrDevice_array = snmp_cache_oid($oid, $device, $hrDevice_array, "HOST-RESOURCES-MIB:HOST-RESOURCES-TYPES"); } +foreach ($hrDevice_oids as $oid) { $hrDevice_array = snmp_cache_oid($oid, $device, $hrDevice_array, "HOST-RESOURCES-MIB:HOST-RESOURCES-TYPES"); } foreach($hrDevice_array[$device[device_id]] as $hrDevice) { if(is_array($hrDevice)) { diff --git a/includes/discovery/storage.php b/includes/discovery/storage.php index 2e48c6ec8..16f57766f 100755 --- a/includes/discovery/storage.php +++ b/includes/discovery/storage.php @@ -7,8 +7,6 @@ $oids = shell_exec($config['snmpwalk'] . " -CI -m HOST-RESOURCES-MIB -Osq -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'] . " hrStorageIndex"); $oids = trim(str_replace("hrStorageIndex.","",$oids)); - echo(".. $oids .. "); - foreach(explode("\n", $oids) as $data) { if($data) { $data = trim($data); diff --git a/includes/polling/device-netstats.inc.php b/includes/polling/device-netstats.inc.php index c5a6ee770..171912cab 100755 --- a/includes/polling/device-netstats.inc.php +++ b/includes/polling/device-netstats.inc.php @@ -37,7 +37,6 @@ if($device[os] != "Snom") { foreach($oids[$proto] as $oid){ $oid_ds = truncate($oid, 19, ''); - echo("\n$oid"); $rrd_create .= " DS:$oid_ds:COUNTER:600:U:100000000000"; $snmpstring .= " $oid.0"; } diff --git a/includes/polling/hr-mib_processor.inc.php b/includes/polling/hr-mib_processor.inc.php index 252e6d6b3..af24a4273 100755 --- a/includes/polling/hr-mib_processor.inc.php +++ b/includes/polling/hr-mib_processor.inc.php @@ -12,10 +12,10 @@ while ($hrDevice = mysql_fetch_array($query)) { $this_hrDevice = $hrDevice_array[$device[device_id]][$hrDevice[hrDeviceIndex]]; $update_query = "UPDATE `hrDevice` SET"; - $update_query .= ", `hrDeviceStatus` = '".mres($this_hrDevice[hrDeviceStatus])."'"; - $update_query .= ", `hrDeviceErrors` = '".mres($this_hrDevice[hrDeviceErrors])."'"; - $update_query .= ", `hrProcessorLoad` = '".mres($this_hrDevice[hrProcessorLoad])."'"; - $update_query .= " WHERE device_id = '".$device['device_id']."' AND hrDeviceIndex = '".$hrDevice['hrDeviceIndex']."'"; + $update_query .= ", `hrDeviceStatus` = '".mres($this_hrDevice['hrDeviceStatus'])."'"; + $update_query .= ", `hrDeviceErrors` = '".mres($this_hrDevice['hrDeviceErrors'])."'"; + $update_query .= ", `hrProcessorLoad` = '".mres($this_hrDevice['hrProcessorLoad'])."'"; + $update_query .= " WHERE hrDevice_id = '".$hrDevice['hrDevice_id']."'"; @mysql_query($update_query); $mysql++; echo("."); $procrrd = addslashes($config['rrd_dir'] . "/" . $device['hostname'] . "/hrProcessor-" . $hrDevice['hrDeviceIndex'] . ".rrd"); diff --git a/includes/polling/ports.inc.php b/includes/polling/ports.inc.php index 02f5dd894..5d1bcd7cd 100755 --- a/includes/polling/ports.inc.php +++ b/includes/polling/ports.inc.php @@ -135,7 +135,6 @@ } $woo = "$polled:$ifInOctets:$ifOutOctets:$ifInErrors:$ifOutErrors:$ifInUcastPkts:$ifOutUcastPkts:$ifInNUcastPkts:$ifOutNUcastPkts"; - echo("\n rrdtool update $rrdfile $woo\n"); $ret = rrdtool_update("$rrdfile", $woo); /// End Update IF-MIB