2010-02-22 00:57:13 +00:00
|
|
|
<?php
|
|
|
|
|
2011-03-15 12:04:26 +00:00
|
|
|
$oid = $mempool['mempool_index'];
|
2010-02-22 00:57:13 +00:00
|
|
|
|
2011-03-15 12:04:26 +00:00
|
|
|
# FIXME snmp_get
|
|
|
|
$pool_cmd = $config['snmpget'] . " -M ".$config['mibdir']. " -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 ' '";
|
2010-02-22 00:57:13 +00:00
|
|
|
|
2011-03-15 12:04:26 +00:00
|
|
|
if ($debug) { echo("$pool_cmd"); }
|
2010-02-22 00:57:13 +00:00
|
|
|
|
2011-03-15 12:04:26 +00:00
|
|
|
$pool = shell_exec($pool_cmd);
|
2010-02-22 00:57:13 +00:00
|
|
|
|
2011-03-15 12:04:26 +00:00
|
|
|
list($mempool['used'], $mempool['free'], $mempool['largestfree']) = explode("\n", $pool);
|
|
|
|
$mempool['total'] = $mempool['used'] + $mempool['free'];
|
2010-02-22 00:57:13 +00:00
|
|
|
|
2011-03-15 12:04:26 +00:00
|
|
|
?>
|