mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
git-svn-id: http://www.observium.org/svn/observer/trunk@2493 61d68cd4-352d-0410-923a-c4978735b2b8
36 lines
850 B
PHP
Executable File
36 lines
850 B
PHP
Executable File
<?php
|
|
|
|
echo("Memory : ");
|
|
|
|
### Include all discovery modules
|
|
|
|
$include_dir = "includes/discovery/mempools";
|
|
include("includes/include-dir.inc.php");
|
|
|
|
### Remove memory pools which weren't redetected here
|
|
|
|
$sql = "SELECT * FROM `mempools` WHERE `device_id` = '".$device['device_id']."'";
|
|
$query = mysql_query($sql);
|
|
|
|
if ($debug) { print_r ($valid_mempool); }
|
|
|
|
while ($test_mempool = mysql_fetch_assoc($query))
|
|
{
|
|
$mempool_index = $test_mempool['mempool_index'];
|
|
$mempool_type = $test_mempool['mempool_type'];
|
|
if ($debug) { echo($mempool_index . " -> " . $mempool_type . "\n"); }
|
|
|
|
if (!$valid_mempool[$mempool_type][$mempool_index])
|
|
{
|
|
echo("-");
|
|
mysql_query("DELETE FROM `mempools` WHERE mempool_id = '" . $test_mempool['mempool_id'] . "'");
|
|
}
|
|
|
|
unset($mempool_oid); unset($mempool_type);
|
|
}
|
|
|
|
unset($valid_mempool);
|
|
echo("\n");
|
|
|
|
?>
|