improve junos cpu detection (!?)

git-svn-id: http://www.observium.org/svn/observer/trunk@2769 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-12-07 18:58:34 +00:00
parent 70af11e466
commit 25f784b140

View File

@ -14,7 +14,7 @@ if ($device['os'] == "junos")
{
foreach ($processors_array as $index => $entry)
{
if ($entry['jnxOperatingDescr'] == "Routing Engine" || $entry['jnxOperatingDescr'] == "Processor" || $entry['jnxOperatingDRAMSize'] || $entry['jnxOperatingMemory'])
if (strlen(strstr($entry['jnxOperatingDescr'], "Routing Engine")) || $entry['jnxOperatingDRAMSize'] && !strpos($entry['jnxOperatingDescr'], "sensor") && !strstr($entry['jnxOperatingDescr'], "fan"))
{
if (stripos($entry['jnxOperatingDescr'], "sensor") || stripos($entry['jnxOperatingDescr'], "fan")) continue;
if ($debug) { echo($index . " " . $entry['jnxOperatingDescr'] . " -> " . $entry['jnxOperatingCPU'] . " -> " . $entry['jnxOperatingDRAMSize'] . "\n"); }