SNMP::...thernet(3pm)
β¨ NAME β¨
SNMP::Info::PowerEthernet β the SNMP bestie that talks to all the data chillin' in POWER-ETHERNET-MIB. π
(also, the manual page header calls this thing SNMP::...thernet(3pm), and it lives in the User Contributed Perl Documentation section, iykyk π«Ά)
π AUTHOR π
Bill Fenner wrote this. iconic of him, honestly. π
π SYNOPSIS π
# Let SNMP::Info determine the correct subclass for you.
my $poe = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
or die "Can't connect to DestHost.\n";
my $class = $poe->class();
print "SNMP::Info determined this device to fall under subclass : $class\n";
like, you literally just let it pick its own subclass and it tells you what it picked. main character behavior fr fr. π
πΈ DESCRIPTION πΈ
POWER-ETHERNET-MIB is the MIB that describes PoE β that's IEEE 802.3af, bestie, the thing that sends power down the ethernet cable so your access point doesn't need its own lil wall wart. β‘π
β οΈ ok so listen: create or use a device subclass that inherits this class. Do not use it directly. this is the blueprint, not the house. π
For debugging purposes you can call this class directly the same way you'd call SNMP::Info:
my $poe = new SNMP::Info::PowerEthernet (...);
π¦ Inherited Classes π¦
none. it's giving self-made. π
π Required MIBs π
POWER-ETHERNET-MIB
π GLOBALS π
none. nothing here. empty. a vacuum. π
π TABLE METHODS π
These are methods that return tables of information in the form of a reference to a hash. (yes bestie, a hashref. get into it. π)
β Power Port Table β
Selected values from the "pethPsePortTable" β the lil table about ports that might get to hand out power. π
$poe->peth_port_admin()β administrative status: is this port, like, permitted to deliver power? yes or no energy.- maps to
"pethPsePortAdminEnable"
- maps to
$poe->peth_port_status()β current status: is this port delivering power, searching, disabled, etc? the vibe check of the port, basically.- maps to
"pethPsePortDetectionStatus"
- maps to
$poe->peth_port_class()β device class: if status is delivering power, this represents the 802.3af class of the device being powered.- maps to
"pethPsePortPowerClassifications"
- maps to
$poe->peth_port_ifindex()β a mapping function from the"pethPsePortTable"INDEX of module.port to an"ifIndex". The default mapping ignores the module β it returnsundefif there are any module values greater than 1 β and just returns the port number, assuming there's a 1:1 mapping.- ngl, this mapping is more or less left up to the device vendor to implement; the MIB gives only very weak guidance. a given device class may implement its own version of this function (e.g. go peek at
Info::CiscoPower). π
- ngl, this mapping is more or less left up to the device vendor to implement; the MIB gives only very weak guidance. a given device class may implement its own version of this function (e.g. go peek at
$poe->peth_port_neg_power()β the power, in milliwatts, that has been committed to this port. This value is derived from the 802.3af class of the device being powered, but it may be overridden by a subclass that has information from another source (e.g. if a different protocol, such asCDP, was used to negotiate the power level). β¨
π Power Supply Table π
$poe->peth_power_watts()β the power supply's capacity, in watts.- maps to
"pethMainPsePower"
- maps to
$poe->peth_power_status()β the power supply's operational status.- maps to
"pethMainPseOperStatus"
- maps to
$poe->peth_power_consumption()β how much power, in watts, this power supply has been committed to deliver.- maps to
"pethMainPseConsumptionPower" - > π heads up: certain devices seem to supply this value in milliwatts instead, so be cautious interpreting it. stay safe out there.
- maps to
$poe->peth_power_threshold()β the threshold (in percent) of consumption required to raise an alarm.- maps to
"pethMainPseUsageThreshold"
- maps to
and that's the whole page, bestie. go forth and poll responsibly. πβ¨
~( ΛΆΛαΛΛ΅ ) this lil writeup came from perl v5.40.1, dated 2026-02-28, and yeah it's still filed under SNMP::...thernet(3pm) β the truncation is real but so is my love for you. mwah. π«Άπ~
π¦ where this page comes from
- ubuntu stonking: libsnmp-info-perl 3.975000-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms