Files
librenms-librenms/includes/polling/mempools/dcn-software.inc.php
Søren Rosiak 9ebe70e446 Improve DCN Device Support (#8878)
DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [X] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
fix #8755 

I have not added test data as it would require filterting quite some LLDP/IP's etc information.
2018-07-19 22:01:21 +01:00

18 lines
722 B
PHP

<?php
/*
* LibreNMS
*
* Copyright (c) 2018 Søren Friis Rosiak <sorenrosiak@gmail.com>
* 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. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
$temp_data = snmp_get_multi_oid($device, 'switchMemorySize.0 switchMemoryBusy.0', '-OUQs', 'DCN-MIB');
$mempool['total'] = $temp_data['switchMemorySize.0'];
$mempool['used'] = $temp_data['switchMemoryBusy.0'];
$mempool['free'] = $mempool['total'] - $mempool['used'];
unset($temp_data);