mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
speedfix mac accounting (removed dns!)
git-svn-id: http://www.observium.org/svn/observer/trunk@2073 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
|
||||
$hostname = $device['hostname'];
|
||||
$hostid = $device['interface_id'];
|
||||
$ifname = $interface['ifDescr'];
|
||||
@@ -127,15 +128,16 @@ if ($_GET['optd'] == "top10")
|
||||
`ports` AS I, `devices` AS D WHERE M.interface_id = '".$interface['interface_id']."' AND I.interface_id = M.interface_id
|
||||
AND I.device_id = D.device_id ORDER BY bps DESC");
|
||||
|
||||
|
||||
while ($acc = mysql_fetch_assoc($query))
|
||||
{
|
||||
if (!is_integer($i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
||||
$addy = mysql_fetch_assoc(mysql_query("SELECT * FROM ipv4_mac where mac_address = '".$acc['mac']."'"));
|
||||
$name = gethostbyaddr($addy['ipv4_address']);
|
||||
|
||||
#$name = gethostbyaddr($addy['ipv4_address']); FIXME - Maybe some caching for this?
|
||||
$arp_host = mysql_fetch_assoc(mysql_query("SELECT * FROM ipv4_addresses AS A, ports AS I, devices AS D WHERE A.ipv4_address = '".$addy['ipv4_address']."' AND I.interface_id = A.interface_id AND D.device_id = I.device_id"));
|
||||
if ($arp_host) { $arp_name = generate_device_link($arp_host); $arp_name .= " ".generate_port_link($arp_host); } else { unset($arp_if); }
|
||||
|
||||
|
||||
if ($name == $addy['ipv4_address']) { unset ($name); }
|
||||
if (mysql_result(mysql_query("SELECT count(*) FROM bgpPeers WHERE device_id = '".$acc['device_id']."' AND bgpPeerIdentifier = '".$addy['ipv4_address']."'"),0))
|
||||
{
|
||||
@@ -215,4 +217,4 @@ if ($_GET['optd'] == "top10")
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user