| 
									
										
										
										
											2010-02-21 05:09:58 +00:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-10 11:23:14 +00:00
										 |  |  | global $valid_processor; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-21 11:58:07 +00:00
										 |  |  | ## JUNOS Processors
 | 
					
						
							| 
									
										
										
										
											2010-02-21 05:09:58 +00:00
										 |  |  | if($device['os'] == "junos") | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2010-02-21 05:17:59 +00:00
										 |  |  |   echo("JUNOS : "); | 
					
						
							| 
									
										
										
										
											2010-07-09 22:38:46 +00:00
										 |  |  |   $processors_array = snmpwalk_cache_multi_oid($device, "jnxOperatingCPU", $processors_array, "JUNIPER-MIB" , '+'.$config['install_dir']."/mibs/junos"); | 
					
						
							|  |  |  |   $processors_array = snmpwalk_cache_multi_oid($device, "jnxOperatingDRAMSize", $processors_array, "JUNIPER-MIB" , '+'.$config['install_dir']."/mibs/junos"); | 
					
						
							|  |  |  |   $processors_array = snmpwalk_cache_multi_oid($device, "jnxOperatingDescr", $processors_array, "JUNIPER-MIB" , '+'.$config['install_dir']."/mibs/junos"); | 
					
						
							| 
									
										
										
										
											2010-07-10 11:23:14 +00:00
										 |  |  |   if ($debug) { print_r($processors_array); } | 
					
						
							| 
									
										
										
										
											2010-02-21 05:09:58 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-11 17:08:56 +00:00
										 |  |  |   if (is_array($processors_array)) | 
					
						
							| 
									
										
										
										
											2010-07-10 11:23:14 +00:00
										 |  |  |   { | 
					
						
							| 
									
										
										
										
											2010-08-11 17:08:56 +00:00
										 |  |  |     foreach ($processors_array as $index => $entry)  | 
					
						
							| 
									
										
										
										
											2010-07-10 11:23:14 +00:00
										 |  |  |     { | 
					
						
							| 
									
										
										
										
											2010-07-30 13:35:58 +00:00
										 |  |  |       if ($entry['jnxOperatingDescr'] == "Routing Engine" || $entry['jnxOperatingDRAMSize'] && !strpos($entry['jnxOperatingDescr'], "sensor") && !strstr($entry['jnxOperatingDescr'], "fan"))  | 
					
						
							| 
									
										
										
										
											2010-07-10 11:23:14 +00:00
										 |  |  |       { | 
					
						
							| 
									
										
										
										
											2010-02-21 14:55:15 +00:00
										 |  |  |         if ($debug) { echo($index . " " . $entry['jnxOperatingDescr'] . " -> " . $entry['jnxOperatingCPU'] . " -> " . $entry['jnxOperatingDRAMSize'] . "\n"); } | 
					
						
							| 
									
										
										
										
											2010-02-21 05:17:59 +00:00
										 |  |  |         $usage_oid = ".1.3.6.1.4.1.2636.3.1.13.1.8." . $index; | 
					
						
							|  |  |  |         $descr = $entry['jnxOperatingDescr']; | 
					
						
							|  |  |  |         $usage = $entry['jnxOperatingCPU']; | 
					
						
							| 
									
										
										
										
											2010-07-10 11:23:14 +00:00
										 |  |  |         if(!strstr($descr, "No") && !strstr($usage, "No") && $descr != "" ) | 
					
						
							|  |  |  |         { | 
					
						
							| 
									
										
										
										
											2010-02-21 05:17:59 +00:00
										 |  |  |           discover_processor($valid_processor, $device, $usage_oid, $index, "junos", $descr, "1", $usage, NULL, NULL); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |       } ## End if checks
 | 
					
						
							|  |  |  |     } ## End Foreach
 | 
					
						
							|  |  |  |   } ## End if array
 | 
					
						
							| 
									
										
										
										
											2010-02-21 05:09:58 +00:00
										 |  |  | } ## End JUNOS Processors
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-10 11:23:14 +00:00
										 |  |  | unset ($processors_array); | 
					
						
							| 
									
										
										
										
											2010-02-21 05:09:58 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | ?>
 |