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-MIB
  • CISCO-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