2010-02-22 00:57:13 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
$oid = $mempool['mempool_index'];
|
|
|
|
|
2010-07-02 19:58:13 +00:00
|
|
|
$pool_cmd = $config['snmpget'] . " -M ".$config['mibdir']. " -m CISCO-MEMORY-POOL-MIB -O Uqnv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'];
|
2010-02-22 00:57:13 +00:00
|
|
|
$pool_cmd .= " ciscoMemoryPoolUsed.$oid ciscoMemoryPoolFree.$oid ciscoMemoryPoolLargestFree.$oid";
|
|
|
|
$pool_cmd .= " | cut -f 1 -d ' '";
|
|
|
|
|
2010-07-18 12:42:00 +00:00
|
|
|
if($debug) {echo("$pool_cmd");}
|
2010-02-22 00:57:13 +00:00
|
|
|
|
|
|
|
$pool = shell_exec($pool_cmd);
|
|
|
|
|
|
|
|
list($mempool['used'], $mempool['free'], $mempool['largestfree']) = explode("\n", $pool);
|
|
|
|
$mempool['total'] = $mempool['used'] + $mempool['free'];
|
|
|
|
|
|
|
|
?>
|