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:
Adam Amstrong
2010-02-22 00:57:13 +00:00
parent 32255a829f
commit d58bd29035
11 changed files with 238 additions and 4 deletions
+16
View File
@@ -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'];
?>