SNMP::Info::Entity - SNMP Interface to data stored in ENTITY-MIB. RFC 2737
Max Baker
# Let SNMP::Info determine the correct subclass for you. my $entity = new SNMP::Info( AutoSpecify => 1, Debug => 1, 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 Layer 2 devices from Brocade, Cisco, HP, and more.
See RFC 2737 for full details.
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.
Tries to determine the device serial number from the ENTITY-MIB. Only considers serial numbers for entries without a parent, or if they are of type chassis. Looks at entPhysicalSerialNum and then entPhysicalDescr for serial number.
entPhysicalSerialNum
entPhysicalDescr
Tries to determine the device OS version from the ENTITY-MIB. Only considers serial numbers for entries without a parent, or if they are of type chassis. Looks at entPhysicalSoftwareRev for the version.
entPhysicalSoftwareRev
Index
(entPhysicalIndex)
entPhysicalIndex
Human entered, not usually used.
(entPhysicalAlias)
entPhysicalAlias
Stack, Module, Container, Port ...
(entPhysicalClass)
entPhysicalClass
Human Friendly
(entPhysicalFirmwareRev)
entPhysicalFirmwareRev
BOOLEAN. Is a Field Replaceable unit?
(entPhysicalFRU)
entPhysicalFRU
(entPhysicalHardwareRev)
entPhysicalHardwareRev
This is human entered and not normally used.
(entPhysicalAssetID)
entPhysicalAssetID
See MIB.
(entAliasMappingIdentifier)
entAliasMappingIdentifier
Model Name of Entity.
(entPhysicalModelName)
entPhysicalModelName
More computer friendly name of entity. Parse me.
(entPhysicalName)
entPhysicalName
0 if root.
(entPhysicalContainedIn)
entPhysicalContainedIn
Maps Entity Table entries to the Interface Table (IfTable) using $entity->e_map()
IfTable
The relative position among all entities sharing the same parent.
(entPhysicalParentRelPos)
entPhysicalParentRelPos
(entPhysicalSerialNum)
(entPhysicalSoftwareRev)
This is an OID, which gets munged into the object name if the right MIB is loaded.
(entPhysicalVendorType)
entPhysicalVendorType
Vendor of Module.
(entPhysicalMfgName)
entPhysicalMfgName
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.