The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Cisco::SNMP::Memory - Memory Interface for Cisco Management

SYNOPSIS

  use Cisco::SNMP::Memory;

DESCRIPTION

The following methods are for memory utilization. These methods implement the CISCO-MEMORY-POOL-MIB.

METHODS

new() - create a new Cisco::SNMP::Memory object

  my $cm = Cisco::SNMP::Memory->new([OPTIONS]);

Create a new Cisco::SNMP::Memory object with OPTIONS as optional parameters. See Cisco::SNMP for options.

memOIDs() - return OID names

  my @memOIDs = $cm->memOIDs();

Return list of Memory MIB object ID names.

memory_info() - return memory utilization info

  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.

memName() - return memory name

  $meminfo->memName([#]);

Return the name of the memory at index '#'. Defaults to 0.

memAlternate() - return memory alternate count

  $meminfo->memAlternate([#]);

Return the alternate count of the memory at index '#'. Defaults to 0.

memValid() - return memory valid count

  $meminfo->memValid([#]);

Return the valid count of the memory at index '#'. Defaults to 0.

memUsed() - return memory used count

  $meminfo->memUsed([#]);

Return the used count of the memory at index '#'. Defaults to 0.

memFree() - return memory free count

  $meminfo->memFree([#]);

Return the free count of the memory at index '#'. Defaults to 0.

memLargestFree() - return memory largest free count

  $meminfo->memLargestFree([#]);

Return the largest free count of the memory at index '#'. Defaults to 0.

memTotal() - return memory total count

  $meminfo->memTotal([#]);

Return the total count of the memory at index '#'. Defaults to 0. This is a derived value, not an actual MIB OID.

DIRECT ACCESS METHODS

The following methods can be called on the Cisco::SNMP::Memory object directly to access the values directly.

get_memName (#)
get_memAlternate (#)
get_memValid (#)
get_memUsed (#)
get_memFree (#)
get_memLargestFree (#)

Get Memory OIDs where (#) is the OID instance, not the index from memory_info. If (#) not provided, uses 0.

INHERITED METHODS

The following are inherited methods. See Cisco::SNMP for more information.

close
error
session

EXPORT

None by default.

EXAMPLES

This distribution comes with several scripts (installed to the default bin install directory) that not only demonstrate example uses but also provide functional execution.

LICENSE

This software is released under the same terms as Perl itself. If you don't know what that means visit http://perl.com/.

AUTHOR

Copyright (C) Michael Vincent 2015

http://www.VinsWorld.com

All rights reserved