Commit version 24.12.13800
This commit is contained in:
@ -4,9 +4,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2022 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
@ -17,25 +17,25 @@
|
||||
|
||||
$mempool_array = snmpwalk_cache_oid($device, 'chRpmMemUsageUtil', [], $mib);
|
||||
if (!safe_empty($mempool_array)) {
|
||||
$total_array = snmpwalk_cache_oid($device, 'chSysProcessorMemSize', [], $mib);
|
||||
print_debug_vars($total_array);
|
||||
$total_array = snmpwalk_cache_oid($device, 'chSysProcessorMemSize', [], $mib);
|
||||
print_debug_vars($total_array);
|
||||
|
||||
foreach ($mempool_array as $index => $entry) {
|
||||
if (is_numeric($entry['chRpmMemUsageUtil'])) {
|
||||
if (is_numeric($total_array[$index]['chSysProcessorMemSize'])) {
|
||||
$precision = 1024 * 1024;
|
||||
$total = $total_array[$index]['chSysProcessorMemSize']; // FTOS display memory in MB
|
||||
//$total *= $precision;
|
||||
} else {
|
||||
$precision = 1;
|
||||
$total = 1090519040; // Hardcoded total.
|
||||
}
|
||||
$percent = $entry['chRpmMemUsageUtil'];
|
||||
$used = $total * $percent / 100;
|
||||
$descr = $index == 1 ? 'CP' : 'RP' . ($index - 1);
|
||||
discover_mempool($valid['mempool'], $device, $index, 'F10-C-SERIES-CHASSIS-MIB', $descr, $precision, $total, $used);
|
||||
foreach ($mempool_array as $index => $entry) {
|
||||
if (is_numeric($entry['chRpmMemUsageUtil'])) {
|
||||
if (is_numeric($total_array[$index]['chSysProcessorMemSize'])) {
|
||||
$precision = 1024 * 1024;
|
||||
$total = $total_array[$index]['chSysProcessorMemSize']; // FTOS display memory in MB
|
||||
//$total *= $precision;
|
||||
} else {
|
||||
$precision = 1;
|
||||
$total = 1090519040; // Hardcoded total.
|
||||
}
|
||||
$percent = $entry['chRpmMemUsageUtil'];
|
||||
$used = $total * $percent / 100;
|
||||
$descr = $index == 1 ? 'CP' : 'RP' . ($index - 1);
|
||||
discover_mempool($valid['mempool'], $device, $index, 'F10-C-SERIES-CHASSIS-MIB', $descr, $precision, $total, $used);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unset($mempool_array, $total_array, $index, $descr, $precision, $total, $used, $percent);
|
||||
|
Reference in New Issue
Block a user