poll quagga on all unices, load device list into memory first

git-svn-id: http://www.observium.org/svn/observer/trunk@751 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2010-01-31 13:49:08 +00:00
parent 5cad734a21
commit b168f5a9c5

View File

@@ -74,7 +74,11 @@ $devices_discovered = 0;
$device_query = mysql_query("SELECT * FROM `devices` WHERE status = '1' $where ORDER BY device_id DESC");
while ($device = mysql_fetch_array($device_query)) {
$devices[] = $device;
}
foreach ($devices as $device)
{
echo($device['hostname'] . " ".$device['device_id']." ".$device['os']." ");
if($os_groups[$device['os']]) {$device['os_group'] = $os_groups[$device['os']]; echo "(".$device['os_group'].")";}
echo("\n");
@@ -118,7 +122,7 @@ while ($device = mysql_fetch_array($device_query)) {
if ($device['type'] == "unknown") { $device['type'] = 'network'; } # FIXME: could also be a Netscreen...
}
if ($device['os'] == "linux")
if ($device['os_group'] == "unix")
{
# Also discover quagga peers
include("includes/discovery/bgp-peers.php");