mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
some db cleanups and removal of debugging and cleanup of processor descriptions
git-svn-id: http://www.observium.org/svn/observer/trunk@1012 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -1 +1,6 @@
|
||||
CREATE TABLE IF NOT EXISTS `toner` ( `toner_id` int(11) NOT NULL auto_increment, `device_id` int(11) NOT NULL default '0', `toner_index` int(11) NOT NULL, `toner_type` varchar(64) NOT NULL, `toner_oid` varchar(64) NOT NULL, `toner_descr` varchar(32) NOT NULL default '', `toner_capacity` int(11) NOT NULL default '0', `toner_current` int(11) NOT NULL default '0', PRIMARY KEY (`toner_id`), KEY `device_id` (`device_id`)) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
ALTER TABLE `mempools` CHANGE `mempool_descr` `mempool_descr` VARCHAR( 64 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL;
|
||||
ALTER TABLE `processors` CHANGE `processor_descr` `processor_descr` VARCHAR( 64 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL;
|
||||
DROP TABLE `cempMemPool`;
|
||||
DROP TABLE `cpmCPU`;
|
||||
DROP TABLE `cmpMemPool`;
|
||||
|
||||
@@ -128,7 +128,6 @@ function discover_mempool(&$valid_mempool, $device, $index, $type, $descr, $prec
|
||||
echo(".");
|
||||
# entry = mysql_fetch_assoc(mysql_query());
|
||||
$query = "UPDATE `mempools` SET `mempool_descr` = '".$descr."', `entPhysicalIndex` = '$entPhysicalIndex', `hrDeviceIndex` = '$hrDeviceIndex' WHERE `device_id` = '".$device['device_id']."' AND `mempool_index` = '".$index."' AND `mempool_type` = '".$type."'";
|
||||
echo("$query");
|
||||
mysql_query($query);
|
||||
if($debug) { print $query . "\n"; }
|
||||
}
|
||||
|
||||
@@ -12,6 +12,10 @@ if($device['os'] == "ios" || $device['os_type'] == "ios") {
|
||||
list($entPhysicalIndex) = explode(".", $index);
|
||||
$entPhysicalDescr = snmp_get($device, "entPhysicalDescr.".$entPhysicalIndex, "-Oqv", "ENTITY-MIB");
|
||||
$descr = $entPhysicalDescr." - ".$entry['cempMemPoolName'];
|
||||
|
||||
$descr = str_replace("Cisco ", "", $descr);
|
||||
$descr = str_replace("Network Processing Engine", "", $descr);
|
||||
|
||||
discover_mempool($valid_mempool, $device, $index, "cemp", $descr, "1", $entPhysicalIndex, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user