From 25f784b1404f77cdb704d8cd8f678b5b3db16175 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Wed, 7 Dec 2011 18:58:34 +0000 Subject: [PATCH] improve junos cpu detection (!?) git-svn-id: http://www.observium.org/svn/observer/trunk@2769 61d68cd4-352d-0410-923a-c4978735b2b8 --- includes/discovery/processors/junos.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/discovery/processors/junos.inc.php b/includes/discovery/processors/junos.inc.php index 01168d6ff..90b9ddd5f 100755 --- a/includes/discovery/processors/junos.inc.php +++ b/includes/discovery/processors/junos.inc.php @@ -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"); }