mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-01 00:24:21 +02:00
add generic memory pool poller and add old-cisco-memory-pool-mib support
git-svn-id: http://www.observium.org/svn/observer/trunk@931 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Executable
+16
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
$oid = $mempool['mempool_index'];
|
||||
|
||||
$pool_cmd = $config['snmpget'] . " -m CISCO-MEMORY-POOL-MIB -O Uqnv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'];
|
||||
$pool_cmd .= " ciscoMemoryPoolUsed.$oid ciscoMemoryPoolFree.$oid ciscoMemoryPoolLargestFree.$oid";
|
||||
$pool_cmd .= " | cut -f 1 -d ' '";
|
||||
|
||||
echo("$pool_cmd");
|
||||
|
||||
$pool = shell_exec($pool_cmd);
|
||||
|
||||
list($mempool['used'], $mempool['free'], $mempool['largestfree']) = explode("\n", $pool);
|
||||
$mempool['total'] = $mempool['used'] + $mempool['free'];
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user