git-svn-id: http://www.observium.org/svn/observer/trunk@319 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2008-11-26 17:58:47 +00:00
parent f33bca5e3e
commit 53e2b400a4
6 changed files with 73 additions and 67 deletions
+18
View File
@@ -16,6 +16,24 @@
if(is_file($Ocpurrd) && !is_file($cpurrd)) { rename($Ocpurrd, $cpurrd); echo("Moving $Ocpurrd to $cpurrd"); }
if(is_file($Omemrrd) && !is_file($memrrd)) { rename($Omemrrd, $memrrd); echo("Moving $Omemrrd to $memrrd"); }
$version = str_replace("Cisco IOS Software,", "", $sysDescr);
$version = str_replace("IOS (tm) ", "", $version);
$version = str_replace(",RELEASE SOFTWARE", "", $version);
$version = str_replace(",MAINTENANCE INTERIM SOFTWARE", "", $version);
$version = str_replace("Version ","", $version);
$version = str_replace("Cisco Internetwork Operating System Software", "", $version);
$version = trim($version);
list($version) = explode("\n", $version);
$version = preg_replace("/^[A-Za-z0-9\ \_]*\(([A-Za-z0-9\-\_]*)\), (.+), .*/", "\\1|\\2", $version);
$version = str_replace("-M|", "|", $version);
$version = str_replace("-", "|", $version);
list($hardware, $features, $version) = explode("|", $version);
$features = fixIOSFeatures($features);
#$hardware = fixIOSHardware($hardware);
if(strstr($ciscomodel, "OID")){ unset($ciscomodel); }
if(!strstr($ciscomodel, " ") && strlen($ciscomodel) >= '3') {
$hardware = $ciscomodel;
}
list ($cpu5m, $cpu5s) = explode("\n", `snmpget -O qv -v2c -c $community $hostname 1.3.6.1.4.1.9.2.1.58.0 1.3.6.1.4.1.9.2.1.56.0`);
$cpu5m = $cpu5m + 0;