Files
librenms-librenms/includes/polling/mempools/fortisandbox.inc.php
PipoCanaja a635881fa9 Clean mempools code to avoid unnecessary snmpget (#11678)
* IES MemPools OS check

* fortisandbox

* mempools fortiweb

* mempools ies5000

* typo
2020-05-26 08:27:42 -05:00

12 lines
565 B
PHP

<?php
// Fortisandbox mempools
if ($device['os'] == 'fortisandbox') {
echo 'FortiSandbox MemPool';
$mempool['perc'] = snmp_get($device, 'FORTINET-FORTISANDBOX-MIB::fsaSysMemUsage.0', '-OvQ');
$mempool['total'] = (snmp_get($device, 'FORTINET-FORTISANDBOX-MIB::fsaSysMemCapacity.0', '-OvQ')) * $mempool['mempool_precision'];
$mempool['used'] = round($mempool['total'] * ($mempool['perc'] / 100));
$mempool['free'] = ($mempool['total'] - $mempool['used']);
echo '(U: '.$mempool['used'].' T: '.$mempool['total'].' F: '.$mempool['free'].') ';
}