diff --git a/fix-port-rrd.php b/fix-port-rrd.php index 8527e21164..9dbec19b85 100755 --- a/fix-port-rrd.php +++ b/fix-port-rrd.php @@ -20,7 +20,7 @@ fixRdd($file); $i++; if(date("U") - $start > 1) - echo round(($i / $count) * 100, 2) . "%\n"; + echo round(($i / $count) * 100, 2) . "% \r"; } function getDirectoryTree( $outerDir, &$files = array()){ @@ -190,9 +190,9 @@ THIRD; $fileC = str_replace('', $third, $fileC); $tmpfname = tempnam("/tmp", "OBS"); file_put_contents($tmpfname, $fileC); - unlink($file); + @unlink($file); $newfile = preg_replace("/(\d+)\.rrd/", "port-\\1.rrd", $file); - unlink($newfile); + @unlink($newfile); shell_exec($config['rrdtool'] . " restore $tmpfname $newfile"); unlink($tmpfname); @@ -200,6 +200,8 @@ THIRD; } + + echo "\n"; ?> diff --git a/html/includes/graphs/sensor/current.inc.php b/html/includes/graphs/sensor/current.inc.php index 9c7755e637..97ff7afe1f 100644 --- a/html/includes/graphs/sensor/current.inc.php +++ b/html/includes/graphs/sensor/current.inc.php @@ -6,13 +6,14 @@ include("includes/graphs/common.inc.php"); $rrd_filename = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("current-" . $sensor['sensor_descr'] . ".rrd"); - $rrd_options .= " COMMENT:' Last Max\\n'"; + $rrd_options .= " COMMENT:' Min Last Max\\n'"; - $sensor['sensor_descr_fixed'] = substr(str_pad($sensor['sensor_descr'], 28),0,28); + $sensor['sensor_descr_fixed'] = substr(str_pad($sensor['sensor_descr'], 18),0,18); $rrd_options .= " DEF:current=$rrd_filename:current:AVERAGE"; $rrd_options .= " LINE1.5:current#cc0000:'" . $sensor['sensor_descr_fixed']."'"; - $rrd_options .= " GPRINT:current:LAST:%3.0lfA"; - $rrd_options .= " GPRINT:current:MAX:%3.0lfA\\\\l"; + $rrd_options .= " GPRINT:current$current_id:MIN:%5.2lfA"; + $rrd_options .= " GPRINT:current:LAST:%5.2lfA"; + $rrd_options .= " GPRINT:current:MAX:%5.2lfA\\\\l"; ?> diff --git a/includes/discovery/cisco-entity-sensor.inc.php b/includes/discovery/cisco-entity-sensor.inc.php index 3d89f8d0ab..09ad28de77 100644 --- a/includes/discovery/cisco-entity-sensor.inc.php +++ b/includes/discovery/cisco-entity-sensor.inc.php @@ -4,7 +4,7 @@ global $valid_sensor; if ($device['os'] == "ios" || $device['os_group'] == "ios") { - echo("CISCO-ENTITY-SENSOR"); + echo(" CISCO-ENTITY-SENSOR"); $oids = array(); @@ -79,5 +79,4 @@ if ($device['os'] == "ios" || $device['os_group'] == "ios") } } - ?> diff --git a/includes/discovery/entity-sensor.inc.php b/includes/discovery/entity-sensor.inc.php index da9c4d4575..aa222c9604 100644 --- a/includes/discovery/entity-sensor.inc.php +++ b/includes/discovery/entity-sensor.inc.php @@ -2,7 +2,7 @@ global $valid_sensor; -echo("ENTITY-SENSOR "); +echo(" ENTITY-SENSOR"); $oids = array(); $oids = snmpwalk_cache_multi_oid($device, "entPhySensorType", $oids, "ENTITY-SENSOR-MIB"); diff --git a/includes/discovery/temperatures/lm-sensors.inc.php b/includes/discovery/temperatures/lm-sensors.inc.php index ef65114d0e..fdb36fc5cb 100644 --- a/includes/discovery/temperatures/lm-sensors.inc.php +++ b/includes/discovery/temperatures/lm-sensors.inc.php @@ -19,6 +19,7 @@ if ($device['os'] == "linux") $temperature_oid = "1.3.6.1.4.1.2021.13.16.2.1.3.$temperature_id"; $temperature = snmp_get($device, $temperature_oid, "-Ovq") / 1000; $descr = str_ireplace("temperature-", "", $descr); + $descr = str_ireplace("temp-", "", $descr); $descr = trim($descr); if($temperature != "0" && $temperature <= "1000") { diff --git a/includes/discovery/temperatures/papouch-tme.inc.php b/includes/discovery/temperatures/papouch-tme.inc.php index d50d76d31e..a71f746c65 100644 --- a/includes/discovery/temperatures/papouch-tme.inc.php +++ b/includes/discovery/temperatures/papouch-tme.inc.php @@ -13,7 +13,7 @@ if ($device['os'] == "papouch-tme") { $temperature_oid = ".1.3.6.1.4.1.18248.1.1.1.0"; $descr = trim(str_replace("\"", "", $descr)); - discover_sensor($valid_sensor, 'temperature', $device, $temperature_oid, "1", 'papouch-tme', $descr, '1', '1', NULL, NULL, NULL, NULL, $temperature); + discover_sensor($valid_sensor, 'temperature', $device, $temperature_oid, "1", 'papouch-tme', $descr, '10', '1', NULL, NULL, NULL, NULL, $temperature); } }