SNMP::...oPower(3pm)
π SNMP::...oPower(3pm) π
okay bestie, so this is SNMP::Info::CiscoPower, a User Contributed Perl Documentation page for the SNMP::...oPower manual. yes the title is literally abbreviated with dots, that's just how it's filed, don't come for it. it's giving "we ran out of room in the header" and honestly? relatable.
πΈ NAME πΈ
SNMP::Info::CiscoPower β an SNMP interface to the data that lives inside CISCO-POWER-ETHERNET-EXT-MIB. that's it, that's the whole vibe. it's the lil' bridge that lets SNMP::Info read the PoE stuff Cisco keeps in that MIB. π
π«Ά AUTHOR π«Ά
Bill Fenner. king behavior, honestly. put some respect on the name. π
β¨ SYNOPSIS β¨
okay so here's the whole how-to, verbatim, no notes:
# 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";
the way that AutoSpecify justβ¦ figures out which subclass you need? main character energy, no cap. π
π DESCRIPTION π
so Info::PowerEthernet needs a per-device helper function to properly map the "pethPsePortTable" onto "ifIndex" values. that's literally this class's entire job. it provides that helper, and it does it using CISCO-POWER-ETHERNET-EXT-MIB. and listen β it does not define any helpers for the extra values this MIB contains. those are justβ¦ sitting there. unused. iconic but unemployed. π
the move is: create or use a device subclass that inherits this class. do not use it directly, bestie, i'm so serious. π
but for debugging purposes you can call this class directly, exactly like you would SNMP::Info:
my $poe = new SNMP::Info::CiscoPower (...);
π Inherited Classes π
none. zero. empty. a beautiful void. π
but heads up: it requires that the device inherits from Info::Entity. that's not optional, that's the rule. β
π¦ Required MIBs π¦
CISCO-POWER-ETHERNET-EXT-MIBCISCO-CDP-MIB
both of them. no skipping. these are the prerequisites, periodt. β
π GLOBALS π
none. nothing. not a single one. we love a humble class. π«Ά
π₯ TABLE METHODS π₯
these are methods that return tables of information, and they hand it to you as a reference to a hash. so like, a hashref. you know the drill. π
β‘ Power Port Table β‘
$poe->peth_port_ifindex()β maps the"pethPsePortTable"to"ifIndex"by way of the ENTITY-MIB. that's the whole plot of this function, and it ate. π$poe->peth_port_power()β power supplied by PoE ports, measured in milliwatts ("cpeExtPsePortPwrConsumption"). milliwatts specifically, don't get cute with the units. β¨
π CDP Port table π
$poe->peth_port_neg_power()β power negotiated using CDP, in milliwatts ("cdpCachePowerConsumption"). again: milliwatts. the unit is not flopping. πΈ
and that's the whole page, babes. this was pulled from perl v5.40.1, dated 2026-02-28, under the SNMP::...oPower(3pm) header. go forth and map your tables, bestie β you got this. π§π
π¦ 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