git-svn-id: http://www.observium.org/svn/observer/trunk@209 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2008-03-29 17:36:54 +00:00
parent 176dd1b453
commit c35328c28f
4 changed files with 6 additions and 4 deletions
+4 -2
View File
@@ -6,7 +6,7 @@ include("includes/functions.php");
if($argv[1]) { $where = "WHERE `interface_id` = '$argv[1]'"; }
$interface_query = mysql_query("SELECT * FROM `interfaces` $where");
$interface_query = mysql_query("SELECT * FROM `interfaces` $where ORDER BY interface_id DESC");
while ($interface = mysql_fetch_array($interface_query)) {
unset($this);
@@ -63,7 +63,6 @@ while ($interface = mysql_fetch_array($interface_query)) {
if($this['ifTrunk']) { echo("Interface is a " . $this['ifTrunk'] . " trunk\n"); }
if($this['ifVlan']) { echo("Interface is a member of vlan " . $this['ifVlan'] . " \n"); }
}
list($ifName, $ifDescr, $ifAdminStatus, $ifOperStatus, $ifAlias, $ifSpeed, $ifDuplex, $ifType, $ifMtu, $ifPhysAddress) = explode("\n", $snmp_output);
@@ -74,6 +73,9 @@ while ($interface = mysql_fetch_array($interface_query)) {
$ifAlias = trim(str_replace("\"", "", $ifAlias));
$ifAlias = trim($ifAlias);
echo("\n$ifName\n");
$ifDescr = fixifname($ifDescr);
$ifPhysAddress = strtolower(str_replace("\"", "", $ifPhysAddress));
$ifPhysAddress = str_replace(" ", ":", $ifPhysAddress);