Cisco::SNMP::Memory - Memory Interface for Cisco Management
use Cisco::SNMP::Memory;
The following methods are for memory utilization. These methods implement the CISCO-MEMORY-POOL-MIB.
CISCO-MEMORY-POOL-MIB
my $cm = Cisco::SNMP::Memory->new([OPTIONS]);
Create a new Cisco::SNMP::Memory object with OPTIONS as optional parameters. See Cisco::SNMP for options.
my @memOIDs = $cm->memOIDs();
Return list of Memory MIB object ID names.
my $meminfo = $cm->memory_info();
Populate a data structure with memory information. If successful, returns a pointer to an array containing memory information.
$meminfo->[0]->{'Name', 'Used', 'Free', ...} $meminfo->[1]->{'Name', 'Used', 'Free', ...} ... $meminfo->[n]->{'Name', 'Used', 'Free', ...}
Allows the following accessors to be called.
$meminfo->memName([#]);
Return the name of the memory at index '#'. Defaults to 0.
$meminfo->memAlternate([#]);
Return the alternate count of the memory at index '#'. Defaults to 0.
$meminfo->memValid([#]);
Return the valid count of the memory at index '#'. Defaults to 0.
$meminfo->memUsed([#]);
Return the used count of the memory at index '#'. Defaults to 0.
$meminfo->memFree([#]);
Return the free count of the memory at index '#'. Defaults to 0.
$meminfo->memLargestFree([#]);
Return the largest free count of the memory at index '#'. Defaults to 0.
$meminfo->memTotal([#]);
Return the total count of the memory at index '#'. Defaults to 0. This is a derived value, not an actual MIB OID.
The following methods can be called on the Cisco::SNMP::Memory object directly to access the values directly.
Get Memory OIDs where (#) is the OID instance, not the index from memory_info. If (#) not provided, uses 0.
memory_info
The following are inherited methods. See Cisco::SNMP for more information.
None by default.
This distribution comes with several scripts (installed to the default bin install directory) that not only demonstrate example uses but also provide functional execution.
bin
This software is released under the same terms as Perl itself. If you don't know what that means visit http://perl.com/.
Copyright (C) Michael Vincent 2015
http://www.VinsWorld.com
All rights reserved
To install Cisco::SNMP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Cisco::SNMP
CPAN shell
perl -MCPAN -e shell install Cisco::SNMP
For more information on module installation, please visit the detailed CPAN module installation guide.