move poller.php (inc os/system) to db* (and others, but poller is biggest change)

git-svn-id: http://www.observium.org/svn/observer/trunk@2298 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-05-13 11:42:26 +00:00
parent f355e33b64
commit bc0cdd2415
9 changed files with 45 additions and 41 deletions

View File

@ -7,13 +7,11 @@ include("includes/functions.php");
## Check all of our interface RRD files for errors
if ($argv[1]) { $where = "AND `interface_id` = '$argv[1]'"; }
if ($argv[1]) { $where = "AND `interface_id` = ?"; $params = array($argv[1]); }
$i = '0';
$interface_query = mysql_query("SELECT * FROM `ports` AS I, `devices` AS D WHERE I.device_id = D.device_id $where");
while ($interface = mysql_fetch_assoc($interface_query))
foreach (dbFetchRows("SELECT * FROM `ports` AS I, `devices` AS D WHERE I.device_id = D.device_id $where", $params) as $interface)
{
$errors = $interface['ifInErrors_delta'] + $interface['ifOutErrors_delta'];
if ($errors > '1')