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

NAME

Cisco::SNMP::CPU - CPU Interface for Cisco Management

SYNOPSIS

  use Cisco::SNMP::CPU;

DESCRIPTION

The following methods are for CPU utilization. These methods implement the CISCO-PROCESS-MIB and OLD-CISCO-SYS-MIB.

METHODS

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

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

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

cpuOIDs() - return OID names

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

Return list of CPU MIB object ID names.

cpu_info() - return CPU utilization info

  my $cpuinfo = $cm->cpu_info();

Populate a data structure with CPU information. If successful, returns pointer to an array containing CPU information.

  $cpuinfo->[0]->{'Name', '5sec', '1min', ...}
  $cpuinfo->[1]->{'Name', '5sec', '1min', ...}
  ...
  $cpuinfo->[n]->{'Name', '5sec', '1min', ...}

Allows the following accessors to be called.

cpuName() - return CPU name

  $cpuinfo->cpuName([#]);

Return the name of the CPU at index '#'. Defaults to 0. This is a derived value from ENTITY-MIB not an actual MIB OID.

cpuType() - return CPU type

  $cpuinfo->cpuType([#]);

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

cpu5sec() - return CPU 5sec utilization

  $cpuinfo->cpu5sec([#]);

Return the 5sec utilization of the CPU at index '#'. Defaults to 0.

cpu1min() - return CPU 1min utilization

  $cpuinfo->cpu1min([#]);

Return the 1min utilization of the CPU at index '#'. Defaults to 0.

cpu5min() - return CPU 5min utilization

  $cpuinfo->cpu5min([#]);

Return the 5min utilization of the CPU at index '#'. Defaults to 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