git-svn-id: http://www.observium.org/svn/observer/trunk@520 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2009-11-13 14:59:47 +00:00
parent 17f74b5aa4
commit 9f2a14730a
3 changed files with 12 additions and 12 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 14 KiB

+11 -11
View File
@@ -1,15 +1,14 @@
<?php
$community = $device['community'];
echo("CISCO-CDP-MIB: ");
$community = $device['community'];
echo("CISCO-CDP-MIB: ");
unset($cdp_array);
$cdp_array = snmpwalk_cache_twopart_oid("cdpCache", $device, $cdp_array, "CISCO-CDP-MIB");
$cdp_array = $cdp_array[$device[device_id]];
unset($cdp_array);
$cdp_array = snmpwalk_cache_twopart_oid("cdpCache", $device, $cdp_array, "CISCO-CDP-MIB");
$cdp_array = $cdp_array[$device[device_id]];
if($cdp_array) {
unset($cdp_links);
foreach( array_keys($cdp_array) as $key) {
$interface = mysql_fetch_array(mysql_query("SELECT * FROM `interfaces` WHERE device_id = '".$device['device_id']."' AND `ifIndex` = '".$key."'"));
@@ -19,11 +18,10 @@
if($device['hostname'] && $interface['ifDescr'] && $cdp_entry_array['cdpCacheDeviceId'] && $cdp_entry_array['cdpCacheDevicePort']){
$cdp_links .= $device['hostname'] . "," . $interface['ifDescr'] . "," . $cdp_entry_array['cdpCacheDeviceId'] . "," . $cdp_entry_array['cdpCacheDevicePort'] . "\n";
}
}
}
}
#echo("$cdp_links");
}
if($cdp_links) {
foreach ( explode("\n" ,$cdp_links) as $link ) {
if ($link == "") { break; }
list($src_host,$src_if, $dst_host, $dst_if) = explode(",", $link);
@@ -65,5 +63,7 @@
}
}
} else { echo ("No Entries"); }
echo("\n");
?>
+1 -1
View File
@@ -1,6 +1,6 @@
<?php
echo("ciscoMemoryPool : ");
echo("OLD-CISCO-MEMORY-POOL: ");
$cmp_oids = array('ciscoMemoryPoolName','ciscoMemoryPoolAlternate','ciscoMemoryPoolValid','ciscoMemoryPoolUsed','ciscoMemoryPoolFree','ciscoMemoryPoolLargestFree');