2010-02-21 05:09:58 +00:00
|
|
|
<?php
|
|
|
|
|
2010-02-21 11:58:07 +00:00
|
|
|
## JUNOS Processors
|
2011-03-15 09:45:00 +00:00
|
|
|
if ($device['os'] == "junos")
|
2010-02-21 05:09:58 +00:00
|
|
|
{
|
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");
|
2011-11-20 11:18:32 +00:00
|
|
|
$processors_array = snmpwalk_cache_multi_oid($device, "jnxOperatingMemory", $processors_array, "JUNIPER-MIB" , '+'.$config['install_dir']."/mibs/junos");
|
2010-07-09 22:38:46 +00:00
|
|
|
$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
|
|
|
{
|
2011-03-15 09:45:00 +00:00
|
|
|
foreach ($processors_array as $index => $entry)
|
2010-07-10 11:23:14 +00:00
|
|
|
{
|
2011-12-07 18:58:34 +00:00
|
|
|
if (strlen(strstr($entry['jnxOperatingDescr'], "Routing Engine")) || $entry['jnxOperatingDRAMSize'] && !strpos($entry['jnxOperatingDescr'], "sensor") && !strstr($entry['jnxOperatingDescr'], "fan"))
|
2010-07-10 11:23:14 +00:00
|
|
|
{
|
2011-11-20 11:18:32 +00:00
|
|
|
if (stripos($entry['jnxOperatingDescr'], "sensor") || stripos($entry['jnxOperatingDescr'], "fan")) continue;
|
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'];
|
2011-03-27 10:21:19 +00:00
|
|
|
if (!strstr($descr, "No") && !strstr($usage, "No") && $descr != "")
|
2010-07-10 11:23:14 +00:00
|
|
|
{
|
2011-05-04 12:58:57 +00:00
|
|
|
discover_processor($valid['processor'], $device, $usage_oid, $index, "junos", $descr, "1", $usage, NULL, NULL);
|
2010-02-21 05:17:59 +00:00
|
|
|
}
|
|
|
|
} ## 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
|
|
|
|
2011-05-04 12:58:57 +00:00
|
|
|
?>
|