diff --git a/html/images/icons/overview/mempools.png b/html/images/icons/overview/mempools.png
new file mode 100644
index 000000000..0d13bb782
Binary files /dev/null and b/html/images/icons/overview/mempools.png differ
diff --git a/html/images/icons/overview/processors.png b/html/images/icons/overview/processors.png
new file mode 100644
index 000000000..844fbe999
Binary files /dev/null and b/html/images/icons/overview/processors.png differ
diff --git a/html/images/icons/storage.png b/html/images/icons/storage.png
new file mode 100755
index 000000000..3d09261a2
Binary files /dev/null and b/html/images/icons/storage.png differ
diff --git a/html/includes/functions.inc.php b/html/includes/functions.inc.php
index d0ea23ae8..15e77f18a 100644
--- a/html/includes/functions.inc.php
+++ b/html/includes/functions.inc.php
@@ -1,5 +1,24 @@
$arg)
+ {
+ $url .= $sep.$key."=".$arg;
+ $sep="&";
+ }
+ return "
";
+}
+
+
function print_percentage_bar ($width, $height, $percent, $left_text, $left_colour, $left_background, $right_text, $right_colour, $right_background)
{
$output = '
@@ -32,14 +51,16 @@ function generate_if_link($args)
return $link;
}
-function generate_port_thumbnail($args) {
+function generate_port_thumbnail($args)
+{
if(!$args['bg']) { $args['bg'] = "FFFFF"; }
$args['content'] = "
";
$output = generate_if_link($args);
echo $output;
}
-function print_optionbar_start ($height = 20, $width = 0) {
+function print_optionbar_start ($height = 20, $width = 0)
+{
echo("
@@ -53,7 +74,8 @@ function print_optionbar_start ($height = 20, $width = 0) {
}
-function print_optionbar_end () {
+function print_optionbar_end ()
+{
echo("
diff --git a/html/includes/print-interface-graphs.inc.php b/html/includes/print-interface-graphs.inc.php
index 680471cdf..3b211048c 100644
--- a/html/includes/print-interface-graphs.inc.php
+++ b/html/includes/print-interface-graphs.inc.php
@@ -6,25 +6,43 @@
if(!$device) { $device['device_id'] = getifhost($interface['interface_id']); }
- $daily_traffic = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$day&to=$now&width=215&height=100";
- $daily_url = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$day&to=$now&width=500&height=150";
+
+# $daily_traffic = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$day&to=$now&width=215&height=100";
+# $daily_url = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$day&to=$now&width=500&height=150";
- $weekly_traffic = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$week&to=$now&width=215&height=100";
- $weekly_url = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$week&to=$now&width=500&height=150";
+# $weekly_traffic = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$week&to=$now&width=215&height=100";
+# $weekly_url = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$week&to=$now&width=500&height=150";
- $monthly_traffic = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$month&to=$now&width=215&height=100";
- $monthly_url = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$month&to=$now&width=500&height=150";
+# $monthly_traffic = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$month&to=$now&width=215&height=100";
+# $monthly_url = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$month&to=$now&width=500&height=150";
- $yearly_traffic = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$year&to=$now&width=215&height=100";
- $yearly_url = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$year&to=$now&width=500&height=150";
+# $yearly_traffic = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$year&to=$now&width=215&height=100";
+# $yearly_url = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$year&to=$now&width=500&height=150";
- echo("', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">
-
");
- echo("', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">
-
");
- echo("', LEFT".$config['overlib_defaults'].", WIDTH, 350);\" onmouseout=\"return nd();\">
-
");
- echo("', LEFT".$config['overlib_defaults'].", WIDTH, 350);\" onmouseout=\"return nd();\">
-
");
+
+ $graph_array['height'] = "100";
+ $graph_array['width'] = "215";
+ $graph_array['to'] = $now;
+ $graph_array['port'] = $interface['interface_id'];
+ $graph_array['type'] = $graph_type;
+
+ $graph_array['from'] = $day;
+ print_graph_tag($graph_array);
+ $graph_array['from'] = $week;
+ print_graph_tag($graph_array);
+ $graph_array['from'] = $month;
+ print_graph_tag($graph_array);
+ $graph_array['from'] = $year;
+ print_graph_tag($graph_array);
+
+
+# echo("', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">
+#
");
+# echo("', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">
+#
");
+# echo("', LEFT".$config['overlib_defaults'].", WIDTH, 350);\" onmouseout=\"return nd();\">
+#
");
+# echo("', LEFT".$config['overlib_defaults'].", WIDTH, 350);\" onmouseout=\"return nd();\">
+#
");
?>
diff --git a/html/pages/device/interface.inc.php b/html/pages/device/interface.inc.php
index 2f4077e37..5f0a8032d 100644
--- a/html/pages/device/interface.inc.php
+++ b/html/pages/device/interface.inc.php
@@ -1,5 +1,7 @@
"0"){
echo(" | Mac Accounting :
Bits
(Mini|Top10) |
@@ -64,40 +65,19 @@ echo ("Mini)");
}
-print_optionbar_end();
-if($_GET['optb']) {
+ if(mysql_result(mysql_query("SELECT COUNT(*) FROM juniAtmVp WHERE interface_id = '".$interface['interface_id']."'"),0) > "0"){
+ echo(" | ATM VPs :");
+ echo(" Bits");
+ echo(" | Packets");
+ echo(" | Cells");
+ echo(" | Errors");
+
+ }
+
+
+print_optionbar_end();
include("pages/device/port/".mres($_GET['optb']).".inc.php");
-} else {
- if(file_exists($config['rrd_dir'] . "/" . $hostname . "/". $ifIndex . ".rrd")) {
-
- $iid = $id;
- echo("Interface Traffic
");
- $graph_type = "port_bits";
- include("includes/print-interface-graphs.inc.php");
-
- echo("Interface Packets
");
- $graph_type = "port_upkts";
- include("includes/print-interface-graphs.inc.php");
-
- echo("Interface Non Unicast
");
- $graph_type = "port_nupkts";
- include("includes/print-interface-graphs.inc.php");
-
- echo("Interface Errors
");
- $graph_type = "port_errors";
- include("includes/print-interface-graphs.inc.php");
-
- if(is_file($config['rrd_dir'] . "/" . $device['hostname'] . "/etherlike-" . $interface['ifIndex'] . ".rrd")) {
- echo("Ethernet Errors
");
- $graph_type = "port_etherlike";
- include("includes/print-interface-graphs.inc.php");
- }
- }
-
-}
-
-
?>
diff --git a/html/pages/device/overview.inc.php b/html/pages/device/overview.inc.php
index 5a50f628d..e3e592e9d 100644
--- a/html/pages/device/overview.inc.php
+++ b/html/pages/device/overview.inc.php
@@ -35,7 +35,7 @@ include("overview/ports.inc.php");
if($services['total']) {
echo("");
- echo("
Services
");
+ echo("
Services
");
echo("
@@ -82,7 +82,7 @@ include("overview/fanspeeds.inc.php");
include("overview/voltages.inc.php");
echo("");
-echo("
Recent Events
");
+echo("
Recent Events
");
$query = "SELECT *,DATE_FORMAT(datetime, '%d/%b/%y %T') as humandate FROM `eventlog` WHERE `host` = '$_GET[id]' ORDER BY `datetime` DESC LIMIT 0,10";
$data = mysql_query($query);
diff --git a/html/pages/device/overview/cemp.inc.php b/html/pages/device/overview/cemp.inc.php
deleted file mode 100644
index f2b8ef409..000000000
--- a/html/pages/device/overview/cemp.inc.php
+++ /dev/null
@@ -1,41 +0,0 @@
-");
- echo("
Memory Pools
");
- echo("
");
- $i = '1';
- $mempools = mysql_query("SELECT * FROM `cempMemPool` WHERE device_id = '" . $device['device_id'] . "'");
- while($mempool = mysql_fetch_array($mempools)) {
- $entPhysicalName = mysql_result(mysql_query("SELECT entPhysicalName from entPhysical WHERE device_id = '".$device['device_id']."'
- AND entPhysicalIndex = '".$mempool['entPhysicalIndex']."'"),0);
- $perc = round($mempool['cempMemPoolUsed'] / ($mempool['cempMemPoolUsed'] + $mempool['cempMemPoolFree']) * 100,2);
- $mempool['descr_fixed'] = $entPhysicalName . " ". $mempool['cempMemPoolName'];
- $mempool['descr_fixed'] = str_replace("Routing Processor", "RP", $mempool['descr_fixed']);
- $mempool['descr_fixed'] = str_replace("Switching Processor", "SP", $mempool['descr_fixed']);
- $mempool['descr_fixed'] = str_replace("Processor", "Proc", $mempool['descr_fixed']);
- $mempool['descr_fixed'] = str_replace("Sub-Module", "Mod", $mempool['descr_fixed']);
- $mempool['descr_fixed'] = str_replace("DFC Card", "DFC", $mempool['descr_fixed']);
-
- $proc_url = "?page=device/".$device['device_id']."/sensors/mempools/";
-
- $mempool_popup = "onmouseover=\"return overlib('".$device['hostname']." - ".$mempool['descr_fixed'];
- $mempool_popup .= "
";
- $mempool_popup .= "', RIGHT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\"";
-
-
- if($mempool['cpuCPMTotal5minRev'] > '60') { $mempool_colour='#cc0000'; } else { $mempool_colour='#0000cc'; }
- echo("| " . $mempool['descr_fixed'] ." |
-  |
- $perc% |
- " . formatstorage($mempool['cempMemPoolFree'], 0) . "/" . formatstorage($mempool['cempMemPoolUsed'] + $mempool['cempMemPoolFree'], 0) . " |
-
");
- $i++;
- }
- echo("
");
- echo("
");
- $cemp = 1;
-}
-
-
-?>
diff --git a/html/pages/device/overview/cmp.inc.php b/html/pages/device/overview/cmp.inc.php
deleted file mode 100644
index 8ee3d679a..000000000
--- a/html/pages/device/overview/cmp.inc.php
+++ /dev/null
@@ -1,38 +0,0 @@
-");
- echo("Memory Pools
");
- echo("");
- $i = '1';
- $mempools = mysql_query("SELECT * FROM `cmpMemPool` WHERE device_id = '" . $device['device_id'] . "'");
- while($mempool = mysql_fetch_array($mempools)) {
- $perc = round($mempool['cmpUsed'] / ($mempool['cmpUsed'] + $mempool['cmpFree']) * 100,2);
- $mempool['descr_fixed'] = $mempool['cmpName'];
- $mempool['descr_fixed'] = str_replace("Routing Processor", "RP", $mempool['descr_fixed']);
- $mempool['descr_fixed'] = str_replace("Switching Processor", "SP", $mempool['descr_fixed']);
- $mempool['descr_fixed'] = str_replace("Processor", "Proc", $mempool['descr_fixed']);
- $mempool['descr_fixed'] = str_replace("Sub-Module", "Mod", $mempool['descr_fixed']);
- $mempool['descr_fixed'] = str_replace("DFC Card", "DFC", $mempool['descr_fixed']);
-
- $proc_url = "/device/".$device['device_id']."/health/cmp/";
-
- $mempool_popup = "onmouseover=\"return overlib('".$device['hostname']." - ".$mempool['descr_fixed'];
- $mempool_popup .= "
";
- $mempool_popup .= "', RIGHT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\"";
-
-
- if($mempool['cpuCPMTotal5minRev'] > '60') { $mempool_colour='#cc0000'; } else { $mempool_colour='#0000cc'; }
- echo("| " . $mempool['descr_fixed'] ." |
-  |
- $perc% |
- " . formatstorage($mempool['cmpFree'], 0) . "/" . formatstorage($mempool['cmpUsed'] + $mempool['cmpFree'], 0) . " |
-
");
- $i++;
- }
- echo("
");
- echo("");
-}
-
-
-?>
diff --git a/html/pages/device/overview/fanspeeds.inc.php b/html/pages/device/overview/fanspeeds.inc.php
index bad2ce56f..2a22bec06 100644
--- a/html/pages/device/overview/fanspeeds.inc.php
+++ b/html/pages/device/overview/fanspeeds.inc.php
@@ -5,7 +5,7 @@ if(mysql_result(mysql_query("SELECT count(fan_id) from fanspeed WHERE device_id
$total = mysql_result(mysql_query("SELECT count(fan_id) from fanspeed WHERE device_id = '" . $device['device_id'] . "'"),0);
$rows = round($total / 2,0);
echo("");
- echo("
Fanspeeds
");
+ echo("
Fanspeeds
");
$i = '1';
$fans = mysql_query("SELECT * FROM fanspeed WHERE device_id = '" . $device['device_id'] . "'");
echo("
");
diff --git a/html/pages/device/overview/mempools.inc.php b/html/pages/device/overview/mempools.inc.php
index f89809160..3d917fdb9 100644
--- a/html/pages/device/overview/mempools.inc.php
+++ b/html/pages/device/overview/mempools.inc.php
@@ -2,7 +2,7 @@
if(mysql_result(mysql_query("SELECT count(*) from mempools WHERE device_id = '" . $device['device_id'] . "'"),0)) {
echo("");
- echo("
Memory Pools
");
+ echo("
Memory Pools
");
echo("
");
$mempool_rows = '1';
$mempools = mysql_query("SELECT * FROM `mempools` WHERE device_id = '" . $device['device_id'] . "'");
diff --git a/html/pages/device/overview/processors.inc.php b/html/pages/device/overview/processors.inc.php
index 6952447c1..9f36e7a61 100644
--- a/html/pages/device/overview/processors.inc.php
+++ b/html/pages/device/overview/processors.inc.php
@@ -3,7 +3,7 @@
if(mysql_result(mysql_query("SELECT count(*) from processors WHERE device_id = '" . $device['device_id'] . "'"),0)) {
$processor_rows = 0;
echo("");
- echo("
Processors
");
+ echo("
Processors
");
echo("
");
$i = '1';
$procs = mysql_query("SELECT * FROM `processors` WHERE device_id = '" . $device['device_id'] . "'");
diff --git a/html/pages/device/overview/storage.inc.php b/html/pages/device/overview/storage.inc.php
index cd66e1ecb..fde4c5934 100644
--- a/html/pages/device/overview/storage.inc.php
+++ b/html/pages/device/overview/storage.inc.php
@@ -2,7 +2,7 @@
if(mysql_result(mysql_query("SELECT count(storage_id) from storage WHERE device_id = '" . $device['device_id'] . "'"),0)) {
echo("");
- echo("
Storage
");
+ echo("
Storage
");
echo("
");
$drive_rows = '0';
diff --git a/html/pages/device/overview/temperatures.inc.php b/html/pages/device/overview/temperatures.inc.php
index 1a865dfd0..cc1dc0a26 100644
--- a/html/pages/device/overview/temperatures.inc.php
+++ b/html/pages/device/overview/temperatures.inc.php
@@ -5,7 +5,7 @@ if(mysql_result(mysql_query("SELECT count(temp_id) from temperature WHERE device
$total = mysql_result(mysql_query("SELECT count(temp_id) from temperature WHERE device_id = '" . $device['device_id'] . "'"),0);
$rows = round($total / 2,0);
echo("");
- echo("
Temperatures
");
+ echo("
Temperatures
");
$i = '1';
$temps = mysql_query("SELECT * FROM temperature WHERE device_id = '" . $device['device_id'] . "'");
echo("
");
diff --git a/html/pages/device/overview/voltages.inc.php b/html/pages/device/overview/voltages.inc.php
index 08e6a2c0f..1c751d74a 100644
--- a/html/pages/device/overview/voltages.inc.php
+++ b/html/pages/device/overview/voltages.inc.php
@@ -5,7 +5,7 @@ if(mysql_result(mysql_query("SELECT count(volt_id) from voltage WHERE device_id
$total = mysql_result(mysql_query("SELECT count(volt_id) from voltage WHERE device_id = '" . $device['device_id'] . "'"),0);
$rows = round($total / 2,0);
echo("");
- echo("
Voltages
");
+ echo("
Voltages
");
$i = '1';
$volts = mysql_query("SELECT * FROM voltage WHERE device_id = '" . $device['device_id'] . "'");
echo("
");
diff --git a/includes/snmp.inc.php b/includes/snmp.inc.php
index 5a81c5a60..2f4ba9324 100644
--- a/includes/snmp.inc.php
+++ b/includes/snmp.inc.php
@@ -82,7 +82,7 @@ function snmp_cache_ifIndex($device) {
}
function snmpwalk_cache_oid($poll_oid, $device, $array, $mib = NULL, $mibdir = NULL) {
- global $config;
+ global $config; global $debug;
$data = snmp_walk($device, $poll_oid, "-OQUs", $mib, $mibdir);
$device_id = $device['device_id'];
foreach(explode("\n", $data) as $entry) {