SNMP::Info::Entity - Perl5 Interface to SNMP data stored in ENTITY-MIB.
Max Baker (max@warped.org)
max@warped.org
# Let SNMP::Info determine the correct subclass for you. my $entity = new SNMP::Info( AutoSpecify => 1, Debug => 1, # These arguments are passed directly on to SNMP::Session DestHost => 'myswitch', Community => 'public', Version => 2 ) or die "Can't connect to DestHost.\n"; my $class = $entity->class(); print "SNMP::Info determined this device to fall under subclass : $class\n";
ENTITY-MIB is used by some Layer 2 devices like HP Switches and Aironet Access Points
Create or use a device subclass that inherit this class. Do not use directly.
For debugging purposes you can call this class directly as you would SNMP::Info
my $entity = new SNMP::Info::Entity (...);
none.
MIBs can be found at ftp://ftp.cisco.com/pub/mibs/v2/v2.tar.gz
These are methods that return tables of information in the form of a reference to a hash.
(entPhysicalClass)
entPhysicalClass
(entPhysicalFirmwareRev)
entPhysicalFirmwareRev
(entPhysicalHardwareRev)
entPhysicalHardwareRev
(entAliasMappingIdentifier)
entAliasMappingIdentifier
(entPhysicalModelName)
entPhysicalModelName
(entPhysicalName)
entPhysicalName
(entPhysicalContainedIn)
entPhysicalContainedIn
Maps EntityTable entries to the Interface Table (IfTable) using $entity->e_map()
(entPhysicalSerialNum)
entPhysicalSerialNum
(entPhysicalSoftwareRev)
entPhysicalSoftwareRev
(entPhysicalVendorType)
entPhysicalVendorType
To install SNMP::Info, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SNMP::Info
CPAN shell
perl -MCPAN -e shell install SNMP::Info
For more information on module installation, please visit the detailed CPAN module installation guide.