mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
more ADSL updates
git-svn-id: http://www.observium.org/svn/observer/trunk@1412 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@ -37,3 +37,6 @@ ALTER TABLE `ipv4_addresses` ADD INDEX ( `interface_id` );
|
|||||||
ALTER TABLE `ipv6_addresses` ADD INDEX ( `interface_id` );
|
ALTER TABLE `ipv6_addresses` ADD INDEX ( `interface_id` );
|
||||||
ALTER TABLE `ipv4_mac` ADD INDEX ( `interface_id` );
|
ALTER TABLE `ipv4_mac` ADD INDEX ( `interface_id` );
|
||||||
CREATE TABLE IF NOT EXISTS `ports_adsl` ( `interface_id` int(11) NOT NULL, `port_adsl_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `adslLineCoding` varchar(8) COLLATE utf8_bin NOT NULL, `adslLineType` varchar(16) COLLATE utf8_bin NOT NULL, `adslAtucInvVendorID` varchar(8) COLLATE utf8_bin NOT NULL, `adslAtucInvVersionNumber` varchar(8) COLLATE utf8_bin NOT NULL, `adslAtucCurrSnrMgn` int(11) NOT NULL, `adslAtucCurrAtn` int(11) NOT NULL, `adslAtucCurrOutputPwr` int(11) NOT NULL, `adslAtucCurrAttainableRate` int(11) NOT NULL, `adslAturInvSerialNumber` varchar(8) COLLATE utf8_bin NOT NULL, `adslAturInvVendorID` varchar(8) COLLATE utf8_bin NOT NULL, `adslAturInvVersionNumber` varchar(8) COLLATE utf8_bin NOT NULL, UNIQUE KEY `interface_id` (`interface_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
CREATE TABLE IF NOT EXISTS `ports_adsl` ( `interface_id` int(11) NOT NULL, `port_adsl_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `adslLineCoding` varchar(8) COLLATE utf8_bin NOT NULL, `adslLineType` varchar(16) COLLATE utf8_bin NOT NULL, `adslAtucInvVendorID` varchar(8) COLLATE utf8_bin NOT NULL, `adslAtucInvVersionNumber` varchar(8) COLLATE utf8_bin NOT NULL, `adslAtucCurrSnrMgn` int(11) NOT NULL, `adslAtucCurrAtn` int(11) NOT NULL, `adslAtucCurrOutputPwr` int(11) NOT NULL, `adslAtucCurrAttainableRate` int(11) NOT NULL, `adslAturInvSerialNumber` varchar(8) COLLATE utf8_bin NOT NULL, `adslAturInvVendorID` varchar(8) COLLATE utf8_bin NOT NULL, `adslAturInvVersionNumber` varchar(8) COLLATE utf8_bin NOT NULL, UNIQUE KEY `interface_id` (`interface_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||||
|
ALTER TABLE `ports_adsl` ADD `adslAtucChanCurrTxRate` INT NOT NULL AFTER `adslAtucCurrAttainableRate`;
|
||||||
|
ALTER TABLE `ports_adsl` ADD `adslAturCurrSnrMgn` int(11) NOT NULL, ADD `adslAturCurrAtn` int(11) NOT NULL, ADD `adslAturCurrOutputPwr` int(11) NOT NULL, ADD `adslAturCurrAttainableRate` INT NOT NULL, ADD `adslAturChanCurrTxRate` INT NOT NULL AFTER `adslAturInvVersionNumber`;
|
||||||
|
ALTER TABLE `ports_adsl` CHANGE `adslAtucCurrSnrMgn` `adslAtucCurrSnrMgn` DECIMAL( 5, 1 ) NOT NULL ,CHANGE `adslAtucCurrAtn` `adslAtucCurrAtn` DECIMAL( 5, 1 ) NOT NULL ,CHANGE `adslAtucCurrOutputPwr` `adslAtucCurrOutputPwr` DECIMAL( 5, 1 ) NOT NULL ,CHANGE `adslAturCurrSnrMgn` `adslAturCurrSnrMgn` DECIMAL( 5, 1 ) NOT NULL ,CHANGE `adslAturCurrAtn` `adslAturCurrAtn` DECIMAL( 5, 1 ) NOT NULL ,CHANGE `adslAturCurrOutputPwr` `adslAturCurrOutputPwr` DECIMAL( 5, 1 ) NOT NULL;
|
||||||
|
39
html/includes/graphs/port_adsl_attainable.inc.php
Normal file
39
html/includes/graphs/port_adsl_attainable.inc.php
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
if($_GET['id']) { $interface = $_GET['id'];
|
||||||
|
} elseif($_GET['port']) { $interface = $_GET['port'];
|
||||||
|
} elseif($_GET['if']) { $interface = $_GET['if'];
|
||||||
|
} elseif($_GET['interface']) { $interface = $_GET['interface']; }
|
||||||
|
|
||||||
|
$query = mysql_query("SELECT * FROM `ports` AS I, `devices` AS D WHERE I.interface_id = '".$interface."'
|
||||||
|
AND I.device_id = D.device_id");
|
||||||
|
|
||||||
|
$port = mysql_fetch_array($query);
|
||||||
|
#if(is_file($config['rrd_dir'] . "/" . $port['hostname'] . "/" . safename($port['ifIndex'] . ".rrd"))) {
|
||||||
|
$rrd_filename = $config['rrd_dir'] . "/" . $port['hostname'] . "/port-" . safename($port['ifIndex'] . "-adsl.rrd");
|
||||||
|
#}
|
||||||
|
|
||||||
|
$rrd_list[0]['filename'] = $rrd_filename;
|
||||||
|
$rrd_list[0]['descr'] = "Downstream";
|
||||||
|
$rrd_list[0]['rra'] = "AtucCurrAttainableR";
|
||||||
|
|
||||||
|
$rrd_list[1]['filename'] = $rrd_filename;
|
||||||
|
$rrd_list[1]['descr'] = "Upstream";
|
||||||
|
$rrd_list[1]['rra'] = "AturCurrAttainableR";
|
||||||
|
|
||||||
|
|
||||||
|
$unit_text = "Bits/sec";
|
||||||
|
|
||||||
|
$units='';
|
||||||
|
$total_units='';
|
||||||
|
$colours='mixed';
|
||||||
|
|
||||||
|
$scale_min = "0";
|
||||||
|
|
||||||
|
$nototal = 1;
|
||||||
|
|
||||||
|
if ($rrd_list) {
|
||||||
|
include ("generic_multi_line.inc.php");
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
145
html/includes/print-interface-adsl.inc.php
Normal file
145
html/includes/print-interface-adsl.inc.php
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
#echo("<pre>");
|
||||||
|
#print_r($interface);
|
||||||
|
#echo("</pre>");
|
||||||
|
|
||||||
|
# This file prints a table row for each interface
|
||||||
|
|
||||||
|
$interface['device_id'] = $device['device_id'];
|
||||||
|
$interface['hostname'] = $device['hostname'];
|
||||||
|
|
||||||
|
$if_id = $interface['interface_id'];
|
||||||
|
|
||||||
|
$interface = ifLabel($interface);
|
||||||
|
|
||||||
|
if(!is_integer($i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
||||||
|
|
||||||
|
|
||||||
|
if($interface['ifInErrors_delta'] > 0 || $interface['ifOutErrors_delta'] > 0) {
|
||||||
|
$error_img = generateiflink($interface,"<img src='images/16/chart_curve_error.png' alt='Interface Errors' border=0>","port_errors");
|
||||||
|
} else { $error_img = ""; }
|
||||||
|
|
||||||
|
echo("<tr style=\"background-color: $row_colour; padding: 5px;\" valign=top onmouseover=\"this.style.backgroundColor='$list_highlight';\" onmouseout=\"this.style.backgroundColor='$row_colour';\"
|
||||||
|
onclick=\"location.href='/device/".$device['device_id']."/interface/".$interface['interface_id']."/'\" style='cursor: hand;'>
|
||||||
|
<td valign=top width=350>");
|
||||||
|
|
||||||
|
echo(" <span class=list-large>
|
||||||
|
" . generateiflink($interface, $interface['ifIndex'] . ". ".$interface['label']) . "
|
||||||
|
|
||||||
|
</span><br /><span class=interface-desc>".$interface['ifAlias']."</span>");
|
||||||
|
|
||||||
|
|
||||||
|
if($interface['ifAlias']) { echo("<br />"); }
|
||||||
|
|
||||||
|
unset ($break);
|
||||||
|
if($port_details) {
|
||||||
|
$ipdata = mysql_query("SELECT * FROM `ipv4_addresses` WHERE `interface_id` = '" . $interface['interface_id'] . "'");
|
||||||
|
while($ip = mysql_fetch_Array($ipdata)) {
|
||||||
|
echo("$break <a class=interface-desc href=\"javascript:popUp('/netcmd.php?cmd=whois&query=$ip[ipv4_address]')\">$ip[ipv4_address]/$ip[ipv4_prefixlen]</a>");
|
||||||
|
$break = ",";
|
||||||
|
}
|
||||||
|
$ip6data = mysql_query("SELECT * FROM `ipv6_addresses` WHERE `interface_id` = '" . $interface['interface_id'] . "'");
|
||||||
|
while($ip6 = mysql_fetch_Array($ip6data)) {
|
||||||
|
echo("$break <a class=interface-desc href=\"javascript:popUp('/netcmd.php?cmd=whois&query=".$ip6['ipv6_address']."')\">".Net_IPv6::compress($ip6['ipv6_address'])."/".$ip6['ipv6_prefixlen']."</a>");
|
||||||
|
$break = ",";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
echo("</span>");
|
||||||
|
|
||||||
|
$width="120"; $height="40"; $from = $day;
|
||||||
|
|
||||||
|
echo("</td><td width=150>");
|
||||||
|
echo("".formatRates($interface['adslAtucChanCurrTxRate']) . "/". formatRates($interface['adslAturChanCurrTxRate']));
|
||||||
|
echo("<br />");
|
||||||
|
$interface['graph_type'] = "port_adsl_speed";
|
||||||
|
echo(generateiflink($interface, "<img src='graph.php?type=".$interface['graph_type']."&port=".$interface['interface_id']."&from=".$from."&to=".$now."&width=".$width."&height=".$height."&legend=no&bg=".
|
||||||
|
str_replace("#","", $row_colour)."'>", $interface['graph_type']));
|
||||||
|
|
||||||
|
echo("</td><td width=150>");
|
||||||
|
echo("".formatRates($interface['adslAtucCurrAttainableRate']) . "/". formatRates($interface['adslAturCurrAttainableRate']));
|
||||||
|
echo("<br />");
|
||||||
|
$interface['graph_type'] = "port_adsl_attainable";
|
||||||
|
echo(generateiflink($interface, "<img src='graph.php?type=".$interface['graph_type']."&port=".$interface['interface_id']."&from=".$from."&to=".$now."&width=".$width."&height=".$height."&legend=no&bg=".
|
||||||
|
str_replace("#","", $row_colour)."'>", $interface['graph_type']));
|
||||||
|
|
||||||
|
echo("</td><td width=150>");
|
||||||
|
echo("".$interface['adslAtucCurrAtn'] . "dB/". $interface['adslAturCurrAtn'] . "dB");
|
||||||
|
echo("<br />");
|
||||||
|
$interface['graph_type'] = "port_adsl_attenuation";
|
||||||
|
echo(generateiflink($interface, "<img src='graph.php?type=".$interface['graph_type']."&port=".$interface['interface_id']."&from=".$from."&to=".$now."&width=".$width."&height=".$height."&legend=no&bg=".
|
||||||
|
str_replace("#","", $row_colour)."'>", $interface['graph_type']));
|
||||||
|
|
||||||
|
echo("</td><td width=150>");
|
||||||
|
echo("".$interface['adslAtucCurrSnrMgn'] . "dB/". $interface['adslAturCurrSnrMgn'] . "dB");
|
||||||
|
echo("<br />");
|
||||||
|
$interface['graph_type'] = "port_adsl_snr";
|
||||||
|
echo(generateiflink($interface, "<img src='graph.php?type=".$interface['graph_type']."&port=".$interface['interface_id']."&from=".$from."&to=".$now."&width=".$width."&height=".$height."&legend=no&bg=".
|
||||||
|
str_replace("#","", $row_colour)."'>", $interface['graph_type']));
|
||||||
|
|
||||||
|
echo("</td><td width=150>");
|
||||||
|
echo("".$interface['adslAtucCurrOutputPwr'] . "dBm/". $interface['adslAturCurrOutputPwr'] . "dBm");
|
||||||
|
echo("<br />");
|
||||||
|
$interface['graph_type'] = "port_adsl_power";
|
||||||
|
echo(generateiflink($interface, "<img src='graph.php?type=".$interface['graph_type']."&port=".$interface['interface_id']."&from=".$from."&to=".$now."&width=".$width."&height=".$height."&legend=no&bg=".
|
||||||
|
str_replace("#","", $row_colour)."'>", $interface['graph_type']));
|
||||||
|
|
||||||
|
|
||||||
|
# if($interface[ifDuplex] != unknown) { echo("<span class=box-desc>Duplex " . $interface['ifDuplex'] . "</span>"); } else { echo("-"); }
|
||||||
|
|
||||||
|
|
||||||
|
# echo("</td><td width=150>");
|
||||||
|
# echo($port_adsl['adslLineCoding']."/".$port_adsl['adslLineType']);
|
||||||
|
# echo("<br />");
|
||||||
|
# echo("Sync:".formatRates($port_adsl['adslAtucChanCurrTxRate']) . "/". formatRates($port_adsl['adslAturChanCurrTxRate']));
|
||||||
|
# echo("<br />");
|
||||||
|
# echo("Max:".formatRates($port_adsl['adslAtucCurrAttainableRate']) . "/". formatRates($port_adsl['adslAturCurrAttainableRate']));
|
||||||
|
# echo("</td><td width=150>");
|
||||||
|
# echo("Atten:".$port_adsl['adslAtucCurrAtn'] . "dB/". $port_adsl['adslAturCurrAtn'] . "dB");
|
||||||
|
# echo("<br />");
|
||||||
|
# echo("SNR:".$port_adsl['adslAtucCurrSnrMgn'] . "dB/". $port_adsl['adslAturCurrSnrMgn']. "dB");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
echo("</td>");
|
||||||
|
|
||||||
|
if($graph_type == "etherlike")
|
||||||
|
{
|
||||||
|
$graph_file = $config['rrd_dir'] . "/" . $device['hostname'] . "/etherlike-". safename($interface['ifIndex']) . ".rrd";
|
||||||
|
} else {
|
||||||
|
$graph_file = $config['rrd_dir'] . "/" . $device['hostname'] . "/". safename($interface['ifIndex']) . ".rrd";
|
||||||
|
}
|
||||||
|
|
||||||
|
if($graph_type && is_file($graph_file)) {
|
||||||
|
|
||||||
|
$type = $graph_type;
|
||||||
|
|
||||||
|
$daily_traffic = "graph.php?port=$if_id&type=" . $graph_type . "&from=$from&to=$now&width=210&height=100";
|
||||||
|
$daily_url = "graph.php?port=$if_id&type=" . $graph_type . "&from=$from&to=$now&width=500&height=150";
|
||||||
|
|
||||||
|
$weekly_traffic = "graph.php?port=$if_id&type=" . $graph_type . "&from=$week&to=$now&width=210&height=100";
|
||||||
|
$weekly_url = "graph.php?port=$if_id&type=" . $graph_type . "&from=$week&to=$now&width=500&height=150";
|
||||||
|
|
||||||
|
$monthly_traffic = "graph.php?port=$if_id&type=" . $graph_type . "&from=$month&to=$now&width=210&height=100";
|
||||||
|
$monthly_url = "graph.php?port=$if_id&type=" . $graph_type . "&from=$month&to=$now&width=500&height=150";
|
||||||
|
|
||||||
|
$yearly_traffic = "graph.php?port=$if_id&type=" . $graph_type . "&from=$year&to=$now&width=210&height=100";
|
||||||
|
$yearly_url = "graph.php?port=$if_id&type=" . $graph_type . "&from=$year&to=$now&width=500&height=150";
|
||||||
|
|
||||||
|
echo("<tr style='background-color: $bg; padding: 5px;'><td colspan=7>");
|
||||||
|
|
||||||
|
echo("<a href='device/" . $interface['device_id'] . "/interface/" . $interface['interface_id'] . "' onmouseover=\"return overlib('<img src=\'$daily_url\'>', LEFT".$config['overlib_defaults'].");\"
|
||||||
|
onmouseout=\"return nd();\"> <img src='$daily_traffic' border=0></a>");
|
||||||
|
echo("<a href='device/" . $interface['device_id'] . "/interface/" . $interface['interface_id'] . "' onmouseover=\"return overlib('<img src=\'$weekly_url\'>', LEFT".$config['overlib_defaults'].");\"
|
||||||
|
onmouseout=\"return nd();\"> <img src='$weekly_traffic' border=0></a>");
|
||||||
|
echo("<a href='device/" . $interface['device_id'] . "/interface/" . $interface['interface_id'] . "' onmouseover=\"return overlib('<img src=\'$monthly_url\'>', LEFT, WIDTH, 350".$config['overlib_defaults'].");\"
|
||||||
|
onmouseout=\"return nd();\"> <img src='$monthly_traffic' border=0></a>");
|
||||||
|
echo("<a href='device/" . $interface['device_id'] . "/interface/" . $interface['interface_id'] . "' onmouseover=\"return overlib('<img src=\'$yearly_url\'>', LEFT, WIDTH, 350".$config['overlib_defaults'].");\"
|
||||||
|
onmouseout=\"return nd();\"> <img src='$yearly_traffic' border=0></a>");
|
||||||
|
|
||||||
|
echo("</td></tr>");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
if(!is_integer($i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
if(!is_integer($i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
||||||
|
|
||||||
|
$port_adsl_query = mysql_query("SELECT * FROM `ports_adsl` WHERE `interface_id` = '".$interface['interface_id']."'");
|
||||||
|
$port_adsl = mysql_fetch_assoc($port_adsl_query);
|
||||||
|
|
||||||
|
|
||||||
if($interface['ifInErrors_delta'] > 0 || $interface['ifOutErrors_delta'] > 0) {
|
if($interface['ifInErrors_delta'] > 0 || $interface['ifOutErrors_delta'] > 0) {
|
||||||
$error_img = generateiflink($interface,"<img src='images/16/chart_curve_error.png' alt='Interface Errors' border=0>","port_errors");
|
$error_img = generateiflink($interface,"<img src='images/16/chart_curve_error.png' alt='Interface Errors' border=0>","port_errors");
|
||||||
} else { $error_img = ""; }
|
} else { $error_img = ""; }
|
||||||
@ -88,16 +92,30 @@
|
|||||||
echo("<span style='color: green;'>" . $vrf['vrf_name'] . "</span>");
|
echo("<span style='color: green;'>" . $vrf['vrf_name'] . "</span>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if($port_adsl['adslLineCoding']) {
|
||||||
|
|
||||||
echo("</td><td width=150>");
|
echo("</td><td width=150>");
|
||||||
if($interface['ifType'] && $interface['ifType'] != "") { echo("<span class=box-desc>" . fixiftype($interface['ifType']) . "</span>"); } else { echo("-"); }
|
echo($port_adsl['adslLineCoding']."/".$port_adsl['adslLineType']);
|
||||||
echo("<br />");
|
echo("<br />");
|
||||||
if($ifHardType && $ifHardType != "") { echo("<span class=box-desc>" . $ifHardType . "</span>"); } else { echo("-"); }
|
echo("Sync:".formatRates($port_adsl['adslAtucChanCurrTxRate']) . "/". formatRates($port_adsl['adslAturChanCurrTxRate']));
|
||||||
echo("</td><td width=150>");
|
echo("<br />");
|
||||||
if($interface['ifPhysAddress'] && $interface['ifPhysAddress'] != "") { echo("<span class=box-desc>" . $interface['ifPhysAddress'] . "</span>"); } else { echo("-"); }
|
echo("Max:".formatRates($port_adsl['adslAtucCurrAttainableRate']) . "/". formatRates($port_adsl['adslAturCurrAttainableRate']));
|
||||||
echo("<br />");
|
echo("</td><td width=150>");
|
||||||
if($interface['ifMtu'] && $interface['ifMtu'] != "") { echo("<span class=box-desc>MTU " . $interface['ifMtu'] . "</span>"); } else { echo("-"); }
|
echo("Atten:".$port_adsl['adslAtucCurrAtn'] . "dB/". $port_adsl['adslAturCurrAtn'] . "dB");
|
||||||
|
echo("<br />");
|
||||||
|
echo("SNR:".$port_adsl['adslAtucCurrSnrMgn'] . "dB/". $port_adsl['adslAturCurrSnrMgn']. "dB");
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
echo("</td><td width=150>");
|
||||||
|
if($interface['ifType'] && $interface['ifType'] != "") { echo("<span class=box-desc>" . fixiftype($interface['ifType']) . "</span>"); } else { echo("-"); }
|
||||||
|
echo("<br />");
|
||||||
|
if($ifHardType && $ifHardType != "") { echo("<span class=box-desc>" . $ifHardType . "</span>"); } else { echo("-"); }
|
||||||
|
echo("</td><td width=150>");
|
||||||
|
if($interface['ifPhysAddress'] && $interface['ifPhysAddress'] != "") { echo("<span class=box-desc>" . $interface['ifPhysAddress'] . "</span>"); } else { echo("-"); }
|
||||||
|
echo("<br />");
|
||||||
|
if($interface['ifMtu'] && $interface['ifMtu'] != "") { echo("<span class=box-desc>MTU " . $interface['ifMtu'] . "</span>"); } else { echo("-"); }
|
||||||
|
}
|
||||||
#}
|
#}
|
||||||
|
|
||||||
echo("</td>");
|
echo("</td>");
|
||||||
|
@ -8,7 +8,9 @@ print_optionbar_start();
|
|||||||
|
|
||||||
echo("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/ports/'>Basic</a> |
|
echo("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/ports/'>Basic</a> |
|
||||||
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/ports/details/'>Details</a> |
|
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/ports/details/'>Details</a> |
|
||||||
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/ports/arp/'>ARP Table</a> | Graphs: ");
|
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/ports/arp/'>ARP Table</a> |
|
||||||
|
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/ports/adsl/'>ADSL</a> |
|
||||||
|
Graphs: ");
|
||||||
|
|
||||||
$graph_types = array("bits" => "Bits",
|
$graph_types = array("bits" => "Bits",
|
||||||
"upkts" => "Unicast Packets",
|
"upkts" => "Unicast Packets",
|
||||||
@ -51,6 +53,18 @@ if($_GET['optc'] == thumbs) {
|
|||||||
} else {
|
} else {
|
||||||
if($_GET['opta'] == "arp" ) {
|
if($_GET['opta'] == "arp" ) {
|
||||||
include("arp.inc.php");
|
include("arp.inc.php");
|
||||||
|
} elseif($_GET['opta'] == "adsl") {
|
||||||
|
echo("<div style='margin: 5px;'><table border=0 cellspacing=0 cellpadding=5 width=100%>");
|
||||||
|
|
||||||
|
echo("<tr><th>Port</th><th>Sync Speed</th><th>Attainable Speed</th><th>Attenuation</th><th>SNR Margin</th><th>Output Powers</th></tr>");
|
||||||
|
$i = "0";
|
||||||
|
$interface_query = mysql_query("select * from `ports` AS P, `ports_adsl` AS A WHERE P.device_id = '".$device['device_id']."' AND A.interface_id = P.interface_id AND P.deleted = '0' ORDER BY `ifIndex` ASC");
|
||||||
|
while($interface = mysql_fetch_array($interface_query)) {
|
||||||
|
include("includes/print-interface-adsl.inc.php");
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
echo("</table></div>");
|
||||||
|
echo("<div style='min-height: 150px;'></div>");
|
||||||
} else {
|
} else {
|
||||||
if($_GET['opta'] == "details" ) { $port_details = 1; }
|
if($_GET['opta'] == "details" ) { $port_details = 1; }
|
||||||
echo("<div style='margin: 5px;'><table border=0 cellspacing=0 cellpadding=5 width=100%>");
|
echo("<div style='margin: 5px;'><table border=0 cellspacing=0 cellpadding=5 width=100%>");
|
||||||
|
@ -48,7 +48,15 @@
|
|||||||
|
|
||||||
$adsl_oids = array('AtucCurrSnrMgn','AtucCurrAtn','AtucCurrOutputPwr','AtucCurrAttainableRate','AtucChanCurrTxRate','AturCurrSnrMgn','AturCurrAtn','AturCurrOutputPwr','AturCurrAttainableRate','AturChanCurrTxRate','AtucPerfLofs','AtucPerfLoss','AtucPerfLprs','AtucPerfESs','AtucPerfInits','AturPerfLofs','AturPerfLoss','AturPerfLprs','AturPerfESs','AtucChanCorrectedBlks','AtucChanUncorrectBlks','AturChanCorrectedBlks','AturChanUncorrectBlks');
|
$adsl_oids = array('AtucCurrSnrMgn','AtucCurrAtn','AtucCurrOutputPwr','AtucCurrAttainableRate','AtucChanCurrTxRate','AturCurrSnrMgn','AturCurrAtn','AturCurrOutputPwr','AturCurrAttainableRate','AturChanCurrTxRate','AtucPerfLofs','AtucPerfLoss','AtucPerfLprs','AtucPerfESs','AtucPerfInits','AturPerfLofs','AturPerfLoss','AturPerfLprs','AturPerfESs','AtucChanCorrectedBlks','AtucChanUncorrectBlks','AturChanCorrectedBlks','AturChanUncorrectBlks');
|
||||||
|
|
||||||
$adsl_db_oids = array('adslLineCoding','adslLineType','adslAtucInvVendorID','adslAtucInvVersionNumber','adslAtucCurrSnrMgn','adslAtucCurrAtn','adslAtucCurrOutputPwr','adslAtucCurrAttainableRate','adslAturInvSerialNumber','adslAturInvVendorID','adslAturInvVersionNumber');
|
$adsl_db_oids = array('adslLineCoding','adslLineType','adslAtucInvVendorID','adslAtucInvVersionNumber','adslAtucCurrSnrMgn','adslAtucCurrAtn','adslAtucCurrOutputPwr',
|
||||||
|
'adslAtucCurrAttainableRate','adslAturInvSerialNumber','adslAturInvVendorID','adslAturInvVersionNumber', 'adslAtucChanCurrTxRate',
|
||||||
|
'adslAturChanCurrTxRate', 'adslAturCurrSnrMgn', 'adslAturCurrAtn', 'adslAturCurrOutputPwr', 'adslAturCurrAttainableRate');
|
||||||
|
|
||||||
|
$adsl_tenth_oids = array('adslAtucCurrSnrMgn','adslAtucCurrAtn','adslAtucCurrOutputPwr','adslAturCurrSnrMgn', 'adslAturCurrAtn', 'adslAturCurrOutputPwr');
|
||||||
|
|
||||||
|
foreach($adsl_tenth_oids as $oid) {
|
||||||
|
$this_port[$oid] = $this_port[$oid] / 10;
|
||||||
|
}
|
||||||
|
|
||||||
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `ports_adsl` WHERE `interface_id` = '".$port['interface_id']."'"),0) == "0") { mysql_query("INSERT INTO `ports_adsl` (`interface_id`) VALUES ('".$port['interface_id']."')"); }
|
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `ports_adsl` WHERE `interface_id` = '".$port['interface_id']."'"),0) == "0") { mysql_query("INSERT INTO `ports_adsl` (`interface_id`) VALUES ('".$port['interface_id']."')"); }
|
||||||
$mysql_update = "UPDATE `ports_adsl` SET `port_adsl_updated` = NOW()";
|
$mysql_update = "UPDATE `ports_adsl` SET `port_adsl_updated` = NOW()";
|
||||||
|
@ -32,7 +32,9 @@
|
|||||||
|
|
||||||
if($config['enable_ports_etherlike']) { echo("dot3Stats "); $array = snmp_cache_oid("dot3StatsEntry", $device, $array, "EtherLike-MIB"); }
|
if($config['enable_ports_etherlike']) { echo("dot3Stats "); $array = snmp_cache_oid("dot3StatsEntry", $device, $array, "EtherLike-MIB"); }
|
||||||
if($config['enable_ports_adsl']) {
|
if($config['enable_ports_adsl']) {
|
||||||
echo("adsl "); $array = snmp_cache_oid(".1.3.6.1.2.1.10.94.1.1.2.1", $device, $array, "ADSL-LINE-MIB");
|
echo("adsl ");
|
||||||
|
$array = snmp_cache_oid(".1.3.6.1.2.1.10.94.1.1.1.1", $device, $array, "ADSL-LINE-MIB");
|
||||||
|
$array = snmp_cache_oid(".1.3.6.1.2.1.10.94.1.1.2.1", $device, $array, "ADSL-LINE-MIB");
|
||||||
$array = snmp_cache_oid(".1.3.6.1.2.1.10.94.1.1.3.1", $device, $array, "ADSL-LINE-MIB");
|
$array = snmp_cache_oid(".1.3.6.1.2.1.10.94.1.1.3.1", $device, $array, "ADSL-LINE-MIB");
|
||||||
$array = snmp_cache_oid(".1.3.6.1.2.1.10.94.1.1.4.1", $device, $array, "ADSL-LINE-MIB");
|
$array = snmp_cache_oid(".1.3.6.1.2.1.10.94.1.1.4.1", $device, $array, "ADSL-LINE-MIB");
|
||||||
$array = snmp_cache_oid(".1.3.6.1.2.1.10.94.1.1.5.1", $device, $array, "ADSL-LINE-MIB");
|
$array = snmp_cache_oid(".1.3.6.1.2.1.10.94.1.1.5.1", $device, $array, "ADSL-LINE-MIB");
|
||||||
|
Reference in New Issue
Block a user