Files
librenms-librenms/includes/polling/mempools/smartax.inc.php
Jozef Rebjak 69007a3b83 Updated Support of Smartax GPON OLT (#11719)
* Updated Support of Smartax GPON OLT

* Updated ports from Negatifff PR

* fixed blank line problem

* Added new sysObjectID

* Fixed Port Stats

* fixed line removals

* Update smartax.inc.php

* Update Smartax.php

* Update smartax.inc.php

* Update smartax.yaml

Co-authored-by: Tony Murray <murraytony@gmail.com>
Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
2020-09-09 16:12:18 +02:00

34 lines
1.1 KiB
PHP

<?php
/**
* smartax.inc.php
*
* LibreNMS mempool poller module for Huawei SmartAX
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package LibreNMS
* @link http://librenms.org
* @copyright 2018 TheGreatDoc
* @author TheGreatDoc <doctoruve@gmail.com>
*/
$oid = '.1.3.6.1.4.1.2011.2.6.7.1.1.2.1.6.' . $mempool['mempool_index'];
$used = snmp_get($device, $oid, '-OvQ');
$mempool['total'] = 100;
$mempool['free'] = ($mempool['total'] - $used);
$mempool['used'] = $used;
unset(
$oid,
$used
);