Fixing some tiny things.

git-svn-id: http://www.observium.org/svn/observer/trunk@96 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2007-04-15 15:16:11 +00:00
parent eca1805886
commit b89fe12503
2 changed files with 11 additions and 10 deletions

View File

@@ -1,11 +1,12 @@
#!/bin/bash
./cdp.php
./discover-cdp.php
./discover-ifs.php
./discover-nets.php
./ips.php
./discover-storage.php
./discover-storage.php &
./cleanup.php
./discover-temperatures.php
./generate-map.sh
./discover-cisco-temp.php
./update-interface.php
./discover-temperatures.php &
./generate-map.sh &
./discover-cisco-temp.php &
./discover-vlans.php &
./update-interface.php &

View File

@@ -49,11 +49,11 @@ while ($device = mysql_fetch_array($device_query)) {
} else { echo("Bad DNS for $dst_host\n"); }
if ( mysql_result(mysql_query("SELECT COUNT(*) FROM `devices` WHERE `hostname` = '$dst_host'"), 0) == '1' &&
mysql_result(mysql_query("SELECT COUNT(*) FROM `devices` WHERE `hostname` = '$src_host'"), 0) == '1' &&
mysql_result(mysql_query("SELECT COUNT(*) FROM `interfaces` AS I, `devices` AS D WHERE `if` = '$dst_if' AND hostname = '$dst_host' AND D.id = I.host"), 0) == '1' &&
mysql_result(mysql_query("SELECT COUNT(*) FROM `interfaces` AS I, `devices` AS D WHERE `if` = '$src_if' AND hostname = '$src_host' AND D.id = I.host"), 0) == '1')
mysql_result(mysql_query("SELECT COUNT(*) FROM `interfaces` AS I, `devices` AS D WHERE `ifDescr` = '$dst_if' AND hostname = '$dst_host' AND D.device_id = I.device_id"), 0) == '1' &&
mysql_result(mysql_query("SELECT COUNT(*) FROM `interfaces` AS I, `devices` AS D WHERE `ifDescr` = '$src_if' AND hostname = '$src_host' AND D.device_id = I.device_id"), 0) == '1')
{
$dst_if_id = mysql_result(mysql_query("SELECT I.id FROM `interfaces` AS I, `devices` AS D WHERE `if` = '$dst_if' AND hostname = '$dst_host' AND D.id = I.host"), 0);
$src_if_id = mysql_result(mysql_query("SELECT I.id FROM `interfaces` AS I, `devices` AS D WHERE `if` = '$src_if' AND hostname = '$src_host' AND D.id = I.host"), 0);
$dst_if_id = mysql_result(mysql_query("SELECT I.interface_id FROM `interfaces` AS I, `devices` AS D WHERE `ifDescr` = '$dst_if' AND hostname = '$dst_host' AND D.device_id = I.device_id"), 0);
$src_if_id = mysql_result(mysql_query("SELECT I.interface_id FROM `interfaces` AS I, `devices` AS D WHERE `ifDescr` = '$src_if' AND hostname = '$src_host' AND D.device_id = I.device_id"), 0);
$linkalive[] = $src_if_id . "," . $dst_if_id;
if ( mysql_result(mysql_query("SELECT COUNT(*) FROM `links` WHERE `dst_if` = '$dst_if_id' AND `src_if` = '$src_if_id'"),0) == '0')
{