mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
improve mac accounting (why was it in port? am i mental?)
git-svn-id: http://www.observium.org/svn/observer/trunk@2201 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -154,9 +154,9 @@ if ($_GET['optd'] == "top10")
|
||||
|
||||
if ($_GET['optc'])
|
||||
{
|
||||
$graph_type = "port_mac_acc_" . $_GET['optc'];
|
||||
$graph_type = "macaccounting_" . $_GET['optc'];
|
||||
} else {
|
||||
$graph_type = "port_mac_acc_bits";
|
||||
$graph_type = "macaccounting_bits";
|
||||
}
|
||||
|
||||
if ($_GET['optd'] == "thumbs")
|
||||
|
@@ -182,7 +182,7 @@ else
|
||||
{
|
||||
case 'macaccounting_bits':
|
||||
case 'macaccounting_pkts':
|
||||
$acc = mysql_fetch_assoc(mysql_query("SELECT * FROM `ipv4_mac` AS I, mac_accounting AS M, ports AS P WHERE I.ipv4_address = '".$peer['bgpPeerIdentifier']."' AND M.mac = I.mac_address AND P.interface_id = M.interface_id"));
|
||||
$acc = mysql_fetch_assoc(mysql_query("SELECT * FROM `ipv4_mac` AS I, `mac_accounting` AS M, `ports` AS P, `devices` AS D WHERE I.ipv4_address = '".$peer['bgpPeerIdentifier']."' AND M.mac = I.mac_address AND P.interface_id = M.interface_id AND D.device_id = P.device_id"));
|
||||
$database = $config['rrd_dir'] . "/" . $device['hostname'] . "/cip-" . $acc['ifIndex'] . "-" . $acc['mac'] . ".rrd";
|
||||
if (is_array($acc) && is_file($database))
|
||||
{
|
||||
@@ -199,8 +199,6 @@ else
|
||||
$graph_array['height'] = "100";
|
||||
$graph_array['width'] = "220";
|
||||
$graph_array['to'] = $now;
|
||||
# $graph_array['type'] = "bgp_" . $_GET['optc'];
|
||||
# $graph_array['id'] = $peer['bgpPeer_id'];
|
||||
echo('<tr bgcolor="'.$bg_colour.'"' . ($bg_image ? ' background="'.$bg_image.'"' : '') . '"><td colspan="9">');
|
||||
include("includes/print-quadgraphs.inc.php");
|
||||
echo("</td></tr>");
|
||||
|
Reference in New Issue
Block a user