mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
more icons and fixing overview.
git-svn-id: http://www.observium.org/svn/observer/trunk@1009 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
BIN
html/images/icons/overview/mempools.png
Normal file
BIN
html/images/icons/overview/mempools.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 532 B |
BIN
html/images/icons/overview/processors.png
Normal file
BIN
html/images/icons/overview/processors.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 589 B |
BIN
html/images/icons/storage.png
Executable file
BIN
html/images/icons/storage.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 390 B |
@ -1,5 +1,24 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
function print_graph_tag ($args)
|
||||||
|
{
|
||||||
|
echo generate_graph_tag ($args);
|
||||||
|
}
|
||||||
|
|
||||||
|
function generate_graph_tag ($args)
|
||||||
|
{
|
||||||
|
global $config;
|
||||||
|
$sep = "?";
|
||||||
|
$url = $config['base_url'] . "/graph.php";
|
||||||
|
foreach ($args as $key => $arg)
|
||||||
|
{
|
||||||
|
$url .= $sep.$key."=".$arg;
|
||||||
|
$sep="&";
|
||||||
|
}
|
||||||
|
return "<img src=\"".$url."\" border=0>";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function print_percentage_bar ($width, $height, $percent, $left_text, $left_colour, $left_background, $right_text, $right_colour, $right_background)
|
function print_percentage_bar ($width, $height, $percent, $left_text, $left_colour, $left_background, $right_text, $right_colour, $right_background)
|
||||||
{
|
{
|
||||||
$output = '
|
$output = '
|
||||||
@ -32,14 +51,16 @@ function generate_if_link($args)
|
|||||||
return $link;
|
return $link;
|
||||||
}
|
}
|
||||||
|
|
||||||
function generate_port_thumbnail($args) {
|
function generate_port_thumbnail($args)
|
||||||
|
{
|
||||||
if(!$args['bg']) { $args['bg'] = "FFFFF"; }
|
if(!$args['bg']) { $args['bg'] = "FFFFF"; }
|
||||||
$args['content'] = "<img src='graph.php?type=".$args['graph_type']."&if=".$args['interface_id']."&from=".$args['from']."&to=".$args['to']."&width=".$args['width']."&height=".$args['height']."&legend=no&bg=".$args['bg']."'>";
|
$args['content'] = "<img src='graph.php?type=".$args['graph_type']."&if=".$args['interface_id']."&from=".$args['from']."&to=".$args['to']."&width=".$args['width']."&height=".$args['height']."&legend=no&bg=".$args['bg']."'>";
|
||||||
$output = generate_if_link($args);
|
$output = generate_if_link($args);
|
||||||
echo $output;
|
echo $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
function print_optionbar_start ($height = 20, $width = 0) {
|
function print_optionbar_start ($height = 20, $width = 0)
|
||||||
|
{
|
||||||
echo("
|
echo("
|
||||||
<div style='margin:auto; text-align: center; margin-top: 0px; margin-bottom: 10px; " . ($width ? 'max-width: ' . $width . 'px; ' : '') . "'>
|
<div style='margin:auto; text-align: center; margin-top: 0px; margin-bottom: 10px; " . ($width ? 'max-width: ' . $width . 'px; ' : '') . "'>
|
||||||
<b class='rounded'>
|
<b class='rounded'>
|
||||||
@ -53,7 +74,8 @@ function print_optionbar_start ($height = 20, $width = 0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function print_optionbar_end () {
|
function print_optionbar_end ()
|
||||||
|
{
|
||||||
echo(" </div>
|
echo(" </div>
|
||||||
</div>
|
</div>
|
||||||
<b class='rounded'>
|
<b class='rounded'>
|
||||||
|
@ -6,25 +6,43 @@
|
|||||||
|
|
||||||
if(!$device) { $device['device_id'] = getifhost($interface['interface_id']); }
|
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_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_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_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_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_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_url = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$year&to=$now&width=500&height=150";
|
||||||
|
|
||||||
echo("<a href='".$daily_url."' onmouseover=\"return overlib('<img src=\'$daily_url\'>', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">
|
|
||||||
<img src='$daily_traffic' border=0></a> ");
|
$graph_array['height'] = "100";
|
||||||
echo("<a href='".$weekly_url."' onmouseover=\"return overlib('<img src=\'$weekly_url\'>', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">
|
$graph_array['width'] = "215";
|
||||||
<img src='$weekly_traffic' border=0></a> ");
|
$graph_array['to'] = $now;
|
||||||
echo("<a href='".$monthly_url."' onmouseover=\"return overlib('<img src=\'$monthly_url\'>', LEFT".$config['overlib_defaults'].", WIDTH, 350);\" onmouseout=\"return nd();\">
|
$graph_array['port'] = $interface['interface_id'];
|
||||||
<img src='$monthly_traffic' border=0></a> ");
|
$graph_array['type'] = $graph_type;
|
||||||
echo("<a href='".$yearly_url."' onmouseover=\"return overlib('<img src=\'$yearly_url\'>', LEFT".$config['overlib_defaults'].", WIDTH, 350);\" onmouseout=\"return nd();\">
|
|
||||||
<img src='$yearly_traffic' border=0></a>");
|
$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("<a href='".$daily_url."' onmouseover=\"return overlib('<img src=\'$daily_url\'>', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">
|
||||||
|
# <img src='$daily_traffic' border=0></a> ");
|
||||||
|
# echo("<a href='".$weekly_url."' onmouseover=\"return overlib('<img src=\'$weekly_url\'>', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">
|
||||||
|
# <img src='$weekly_traffic' border=0></a> ");
|
||||||
|
# echo("<a href='".$monthly_url."' onmouseover=\"return overlib('<img src=\'$monthly_url\'>', LEFT".$config['overlib_defaults'].", WIDTH, 350);\" onmouseout=\"return nd();\">
|
||||||
|
# <img src='$monthly_traffic' border=0></a> ");
|
||||||
|
# echo("<a href='".$yearly_url."' onmouseover=\"return overlib('<img src=\'$yearly_url\'>', LEFT".$config['overlib_defaults'].", WIDTH, 350);\" onmouseout=\"return nd();\">
|
||||||
|
# <img src='$yearly_traffic' border=0></a>");
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
if( !isset($_GET['optb']) ) { $_GET['optb'] = "graphs"; }
|
||||||
|
|
||||||
$interface_query = mysql_query("select * from ports WHERE interface_id = '".$_GET['opta']."'");
|
$interface_query = mysql_query("select * from ports WHERE interface_id = '".$_GET['opta']."'");
|
||||||
$interface = mysql_fetch_array($interface_query);
|
$interface = mysql_fetch_array($interface_query);
|
||||||
|
|
||||||
@ -55,8 +57,7 @@ echo ("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/inte
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(mysql_result(mysql_query("SELECT count(*) FROM mac_accounting WHERE interface_id = '".$interface['interface_id']."'"),0)){
|
if(mysql_result(mysql_query("SELECT count(*) FROM mac_accounting WHERE interface_id = '".$interface['interface_id']."'"),0) > "0"){
|
||||||
|
|
||||||
echo(" | Mac Accounting :
|
echo(" | Mac Accounting :
|
||||||
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/macaccounting/bits/'>Bits</a>
|
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/macaccounting/bits/'>Bits</a>
|
||||||
(<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/macaccounting/bits/thumbs/'>Mini</a>|<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/macaccounting/bits/top10/'>Top10</a>) |
|
(<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/macaccounting/bits/thumbs/'>Mini</a>|<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/macaccounting/bits/top10/'>Top10</a>) |
|
||||||
@ -64,40 +65,19 @@ echo ("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/inte
|
|||||||
(<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/macaccounting/pkts/thumbs/'>Mini</a>)");
|
(<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/macaccounting/pkts/thumbs/'>Mini</a>)");
|
||||||
}
|
}
|
||||||
|
|
||||||
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(" <a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/junose-atm-vp/octets/'>Bits</a>");
|
||||||
|
echo(" | <a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/junose-atm-vp/packets/'>Packets</a>");
|
||||||
|
echo(" | <a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/junose-atm-vp/cells/'>Cells</a>");
|
||||||
|
echo(" | <a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/junose-atm-vp/errors/'>Errors</a>");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
print_optionbar_end();
|
||||||
|
|
||||||
include("pages/device/port/".mres($_GET['optb']).".inc.php");
|
include("pages/device/port/".mres($_GET['optb']).".inc.php");
|
||||||
|
|
||||||
} else {
|
|
||||||
if(file_exists($config['rrd_dir'] . "/" . $hostname . "/". $ifIndex . ".rrd")) {
|
|
||||||
|
|
||||||
$iid = $id;
|
|
||||||
echo("<div class=graphhead>Interface Traffic</div>");
|
|
||||||
$graph_type = "port_bits";
|
|
||||||
include("includes/print-interface-graphs.inc.php");
|
|
||||||
|
|
||||||
echo("<div class=graphhead>Interface Packets</div>");
|
|
||||||
$graph_type = "port_upkts";
|
|
||||||
include("includes/print-interface-graphs.inc.php");
|
|
||||||
|
|
||||||
echo("<div class=graphhead>Interface Non Unicast</div>");
|
|
||||||
$graph_type = "port_nupkts";
|
|
||||||
include("includes/print-interface-graphs.inc.php");
|
|
||||||
|
|
||||||
echo("<div class=graphhead>Interface Errors</div>");
|
|
||||||
$graph_type = "port_errors";
|
|
||||||
include("includes/print-interface-graphs.inc.php");
|
|
||||||
|
|
||||||
if(is_file($config['rrd_dir'] . "/" . $device['hostname'] . "/etherlike-" . $interface['ifIndex'] . ".rrd")) {
|
|
||||||
echo("<div class=graphhead>Ethernet Errors</div>");
|
|
||||||
$graph_type = "port_etherlike";
|
|
||||||
include("includes/print-interface-graphs.inc.php");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -35,7 +35,7 @@ include("overview/ports.inc.php");
|
|||||||
if($services['total']) {
|
if($services['total']) {
|
||||||
|
|
||||||
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>");
|
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>");
|
||||||
echo("<p class=sectionhead>Services</p><div style='height: 5px;'></div>");
|
echo("<p style='padding: 0px 5px 5px;' class=sectionhead><img align='absmiddle' src='".$config['base_url']."/images/16/cog.png'> Services</p><div style='height: 5px;'></div>");
|
||||||
|
|
||||||
echo("
|
echo("
|
||||||
<table class=tablehead cellpadding=2 cellspacing=0 width=100%>
|
<table class=tablehead cellpadding=2 cellspacing=0 width=100%>
|
||||||
@ -82,7 +82,7 @@ include("overview/fanspeeds.inc.php");
|
|||||||
include("overview/voltages.inc.php");
|
include("overview/voltages.inc.php");
|
||||||
|
|
||||||
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>");
|
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>");
|
||||||
echo("<p class=sectionhead>Recent Events</p>");
|
echo("<p style='padding: 0px 5px 5px;' class=sectionhead><img align='absmiddle' src='".$config['base_url']."/images/16/report.png'> Recent Events</p>");
|
||||||
|
|
||||||
$query = "SELECT *,DATE_FORMAT(datetime, '%d/%b/%y %T') as humandate FROM `eventlog` WHERE `host` = '$_GET[id]' ORDER BY `datetime` DESC LIMIT 0,10";
|
$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);
|
$data = mysql_query($query);
|
||||||
|
@ -1,41 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
if(mysql_result(mysql_query("SELECT count(*) from cempMemPool WHERE device_id = '" . $device['device_id'] . "'"),0)) {
|
|
||||||
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>");
|
|
||||||
echo("<p class=sectionhead>Memory Pools</p>");
|
|
||||||
echo("<table width=100%>");
|
|
||||||
$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('<div class=list-large>".$device['hostname']." - ".$mempool['descr_fixed'];
|
|
||||||
$mempool_popup .= "</div><img src=\'graph.php?id=" . $mempool['cempMemPool_id'] . "&type=cempMemPool&from=$month&to=$now&width=400&height=125\'>";
|
|
||||||
$mempool_popup .= "', RIGHT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\"";
|
|
||||||
|
|
||||||
|
|
||||||
if($mempool['cpuCPMTotal5minRev'] > '60') { $mempool_colour='#cc0000'; } else { $mempool_colour='#0000cc'; }
|
|
||||||
echo("<tr><td class=tablehead><a href='$proc_url' $mempool_popup>" . $mempool['descr_fixed'] ."</a></td>
|
|
||||||
<td><a href='#' $mempool_popup><img src='percentage.php?per=" . $perc . "'></a></td>
|
|
||||||
<td style='font-weight: bold; color: $drv_colour'>$perc%</td>
|
|
||||||
<td style='color: $drv_colour'>" . formatstorage($mempool['cempMemPoolFree'], 0) . "/" . formatstorage($mempool['cempMemPoolUsed'] + $mempool['cempMemPoolFree'], 0) . "</strong></td>
|
|
||||||
</tr>");
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
echo("</table>");
|
|
||||||
echo("</div>");
|
|
||||||
$cemp = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
|
@ -1,38 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
if(mysql_result(mysql_query("SELECT count(*) from cmpMemPool WHERE device_id = '" . $device['device_id'] . "'"),0) && !$cemp) {
|
|
||||||
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>");
|
|
||||||
echo("<p class=sectionhead>Memory Pools</p>");
|
|
||||||
echo("<table width=100%>");
|
|
||||||
$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('<div class=list-large>".$device['hostname']." - ".$mempool['descr_fixed'];
|
|
||||||
$mempool_popup .= "</div><img src=\'graph.php?id=" . $mempool['cmp_id'] . "&type=cmpMemPool&from=$month&to=$now&width=400&height=125\'>";
|
|
||||||
$mempool_popup .= "', RIGHT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\"";
|
|
||||||
|
|
||||||
|
|
||||||
if($mempool['cpuCPMTotal5minRev'] > '60') { $mempool_colour='#cc0000'; } else { $mempool_colour='#0000cc'; }
|
|
||||||
echo("<tr><td class=tablehead><a href='$proc_url' $mempool_popup>" . $mempool['descr_fixed'] ."</a></td>
|
|
||||||
<td><a href='#' $mempool_popup><img src='percentage.php?per=" . $perc . "'></a></td>
|
|
||||||
<td style='font-weight: bold; color: $drv_colour'>$perc%</td>
|
|
||||||
<td style='color: $drv_colour'>" . formatstorage($mempool['cmpFree'], 0) . "/" . formatstorage($mempool['cmpUsed'] + $mempool['cmpFree'], 0) . "</strong></td>
|
|
||||||
</tr>");
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
echo("</table>");
|
|
||||||
echo("</div>");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
|
@ -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);
|
$total = mysql_result(mysql_query("SELECT count(fan_id) from fanspeed WHERE device_id = '" . $device['device_id'] . "'"),0);
|
||||||
$rows = round($total / 2,0);
|
$rows = round($total / 2,0);
|
||||||
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>");
|
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>");
|
||||||
echo("<p class=sectionhead><img align='absmiddle' src='".$config['base_url']."/images/icons/fans.png'> Fanspeeds</p>");
|
echo("<p style='padding: 0px 5px 5px;' class=sectionhead><img align='absmiddle' src='".$config['base_url']."/images/icons/fans.png'> Fanspeeds</p>");
|
||||||
$i = '1';
|
$i = '1';
|
||||||
$fans = mysql_query("SELECT * FROM fanspeed WHERE device_id = '" . $device['device_id'] . "'");
|
$fans = mysql_query("SELECT * FROM fanspeed WHERE device_id = '" . $device['device_id'] . "'");
|
||||||
echo("<table width=100% valign=top>");
|
echo("<table width=100% valign=top>");
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
if(mysql_result(mysql_query("SELECT count(*) from mempools WHERE device_id = '" . $device['device_id'] . "'"),0)) {
|
if(mysql_result(mysql_query("SELECT count(*) from mempools WHERE device_id = '" . $device['device_id'] . "'"),0)) {
|
||||||
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>");
|
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>");
|
||||||
echo("<p style='padding: 0px 5px 5px;' class=sectionhead><img align='absmiddle' src='".$config['base_url']."/images/icons/mempool.png'> Memory Pools</p>");
|
echo("<p style='padding: 0px 5px 5px;' class=sectionhead><img align='absmiddle' src='".$config['base_url']."/images/icons/overview/mempools.png'> Memory Pools</p>");
|
||||||
echo("<table width=100% cellspacing=0 cellpadding=5>");
|
echo("<table width=100% cellspacing=0 cellpadding=5>");
|
||||||
$mempool_rows = '1';
|
$mempool_rows = '1';
|
||||||
$mempools = mysql_query("SELECT * FROM `mempools` WHERE device_id = '" . $device['device_id'] . "'");
|
$mempools = mysql_query("SELECT * FROM `mempools` WHERE device_id = '" . $device['device_id'] . "'");
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
if(mysql_result(mysql_query("SELECT count(*) from processors WHERE device_id = '" . $device['device_id'] . "'"),0)) {
|
if(mysql_result(mysql_query("SELECT count(*) from processors WHERE device_id = '" . $device['device_id'] . "'"),0)) {
|
||||||
$processor_rows = 0;
|
$processor_rows = 0;
|
||||||
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>");
|
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>");
|
||||||
echo("<p style='padding: 0px 5px 5px;' class=sectionhead><img align='absmiddle' src='".$config['base_url']."/images/icons/cpuload.png'> Processors</p>");
|
echo("<p style='padding: 0px 5px 5px;' class=sectionhead><img align='absmiddle' src='".$config['base_url']."/images/icons/overview/processors.png'> Processors</p>");
|
||||||
echo("<table width=100% cellspacing=0 cellpadding=5>");
|
echo("<table width=100% cellspacing=0 cellpadding=5>");
|
||||||
$i = '1';
|
$i = '1';
|
||||||
$procs = mysql_query("SELECT * FROM `processors` WHERE device_id = '" . $device['device_id'] . "'");
|
$procs = mysql_query("SELECT * FROM `processors` WHERE device_id = '" . $device['device_id'] . "'");
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
if(mysql_result(mysql_query("SELECT count(storage_id) from storage WHERE device_id = '" . $device['device_id'] . "'"),0)) {
|
if(mysql_result(mysql_query("SELECT count(storage_id) from storage WHERE device_id = '" . $device['device_id'] . "'"),0)) {
|
||||||
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>");
|
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>");
|
||||||
echo("<p class=sectionhead>Storage</p>");
|
echo("<p style='padding: 0px 5px 5px;' class=sectionhead><img align='absmiddle' src='".$config['base_url']."/images/icons/storage.png'> Storage</p>");
|
||||||
echo("<table width=100% cellspacing=0 cellpadding=5>");
|
echo("<table width=100% cellspacing=0 cellpadding=5>");
|
||||||
$drive_rows = '0';
|
$drive_rows = '0';
|
||||||
|
|
||||||
|
@ -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);
|
$total = mysql_result(mysql_query("SELECT count(temp_id) from temperature WHERE device_id = '" . $device['device_id'] . "'"),0);
|
||||||
$rows = round($total / 2,0);
|
$rows = round($total / 2,0);
|
||||||
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>");
|
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>");
|
||||||
echo("<p class=sectionhead><img align='absmiddle' src='".$config['base_url']."/images/icons/temperature.png'> Temperatures</p>");
|
echo("<p style='padding: 0px 5px 5px;' class=sectionhead><img align='absmiddle' src='".$config['base_url']."/images/icons/temperature.png'> Temperatures</p>");
|
||||||
$i = '1';
|
$i = '1';
|
||||||
$temps = mysql_query("SELECT * FROM temperature WHERE device_id = '" . $device['device_id'] . "'");
|
$temps = mysql_query("SELECT * FROM temperature WHERE device_id = '" . $device['device_id'] . "'");
|
||||||
echo("<table width=100% valign=top>");
|
echo("<table width=100% valign=top>");
|
||||||
|
@ -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);
|
$total = mysql_result(mysql_query("SELECT count(volt_id) from voltage WHERE device_id = '" . $device['device_id'] . "'"),0);
|
||||||
$rows = round($total / 2,0);
|
$rows = round($total / 2,0);
|
||||||
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>");
|
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>");
|
||||||
echo("<p class=sectionhead><img align='absmiddle' src='".$config['base_url']."/images/icons/voltages.png'> Voltages</p>");
|
echo("<p style='padding: 0px 5px 5px;' class=sectionhead><img align='absmiddle' src='".$config['base_url']."/images/icons/voltages.png'> Voltages</p>");
|
||||||
$i = '1';
|
$i = '1';
|
||||||
$volts = mysql_query("SELECT * FROM voltage WHERE device_id = '" . $device['device_id'] . "'");
|
$volts = mysql_query("SELECT * FROM voltage WHERE device_id = '" . $device['device_id'] . "'");
|
||||||
echo("<table width=100% valign=top>");
|
echo("<table width=100% valign=top>");
|
||||||
|
@ -82,7 +82,7 @@ function snmp_cache_ifIndex($device) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function snmpwalk_cache_oid($poll_oid, $device, $array, $mib = NULL, $mibdir = NULL) {
|
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);
|
$data = snmp_walk($device, $poll_oid, "-OQUs", $mib, $mibdir);
|
||||||
$device_id = $device['device_id'];
|
$device_id = $device['device_id'];
|
||||||
foreach(explode("\n", $data) as $entry) {
|
foreach(explode("\n", $data) as $entry) {
|
||||||
|
Reference in New Issue
Block a user