mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* Added detection for Hirschmann Railswitch * Update AUTHORS.md I agree to the conditions of the Contributor Agreement contained in doc/General/Contributing.md. * Fixes for PR 6207 requested changes * Fixes for PR 6207 requested changes * Fixes for PR 6207 requested changes * Fix for PR 6207 requested changes * Fix for PR 6207 requested changes * Fix for PR 6207 requested changes (old states and temperatures directories removal) * fix for PR 6207 : state fileupdated
15 lines
536 B
PHP
15 lines
536 B
PHP
<?php
|
|
|
|
if ($device['os'] == 'hirschmann') {
|
|
$mem_allocated = snmp_get($device, 'HMPRIV-MGMT-SNMP-MIB::hmMemoryAllocated.0', '-OvQU');
|
|
$mem_free = snmp_get($device, 'HMPRIV-MGMT-SNMP-MIB::hmMemoryFree.0', '-OvQU');
|
|
$perc = $mem_allocated / ($mem_allocated + $mem_free) * 100;
|
|
|
|
$mempool['perc'] = $perc;
|
|
$mempool['total'] = ($mem_allocated + $mem_free);
|
|
$mempool['used'] = $mem_allocated;
|
|
$mempool['free'] = $mem_free;
|
|
|
|
echo '(U: '.$mempool['used'].' T: '.$mempool['total'].' F: '.$mempool['free'].') ';
|
|
}
|