---
name: "SNMP::Info::Entity"
section: "3pm"
platform: "linux"
package: "libsnmp-info-perl"
version: "3.972002-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SNMP::Info::Entity"
---

# SNMP::Info::Entity(3pm)

SNMP Interface to data stored in ENTITY-MIB. RFC 2737

## NAME

SNMP::Info::Entity - SNMP Interface to data stored in ENTITY-MIB. RFC 2737

## AUTHOR

Max Baker

## SYNOPSIS

```
 # 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";
```

## DESCRIPTION

*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 (...);
```

### Inherited Classes

none.

### Required MIBs

- *ENTITY-MIB*

  ## GLOBALS

none.

## TABLE METHODS

These are methods that return tables of information in the form of a reference to a hash.

- $entity-\>**entity\_derived\_serial()**

  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.

- $entity-\>**entity\_derived\_os\_ver()**

  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.

### Entity Table

- $entity-\>**e\_index()**

  Index

  (`"entPhysicalIndex"`)

- $entity-\>**e\_alias()**

  Human entered, not usually used.

  (`"entPhysicalAlias"`)

- $entity-\>**e\_class()**

  Stack, Module, Container, Port ...

  (`"entPhysicalClass"`)

- $entity-\>**e\_descr()**

  Human Friendly

  (`"entPhysicalClass"`)

- $entity-\>**e\_fwver()**

  (`"entPhysicalFirmwareRev"`)

- $entity-\>**e\_fru()**

  BOOLEAN. Is a Field Replaceable unit?

  (`"entPhysicalFRU"`)

- $entity-\>**e\_hwver()**

  (`"entPhysicalHardwareRev"`)

- $entity-\>**e\_id()**

  This is human entered and not normally used.

  (`"entPhysicalAssetID"`)

- $entity-\>**e\_map()**

  See MIB.

  (`"entAliasMappingIdentifier"`)

- $entity-\>**e\_model()**

  Model Name of Entity.

  (`"entPhysicalModelName"`)

- $entity-\>**e\_name()**

  More computer friendly name of entity.  Parse me.

  (`"entPhysicalName"`)

- $entity-\>**e\_parent()**

  0 if root.

  (`"entPhysicalContainedIn"`)

- $entity-\>**e\_port()**

  Maps Entity Table entries to the Interface Table (`"IfTable"`) using `$entity`-\>**e\_map()**

- $entity-\>**e\_pos()**

  The relative position among all entities sharing the same parent.

  (`"entPhysicalParentRelPos"`)

- $entity-\>**e\_serial()**

  (`"entPhysicalSerialNum"`)

- $entity-\>**e\_swver()**

  (`"entPhysicalSoftwareRev"`)

- $entity-\>**e\_type()**

  This is an OID, which gets munged into the object name if the right MIB is loaded.

  (`"entPhysicalVendorType"`)

- $entity-\>**e\_vendor()**

  Vendor of Module.

  (`"entPhysicalMfgName"`)
