SNMP::...r7::APC(3pm)

πŸ’– SNMP::...r7::APC(3pm) β€” the perl manual page, but make it cute πŸ’–

okay bestie, welcome to SNMP::...r7::APC, a little module from the User Contributed Perl Documentation πŸ’… it's a SNMP Interface to APC UPS devices, and honestly? iconic. no cap.

AUTHOR: Jeroen van Ingen 🫢 (yes, one person, one legend, we stan)


✨ SYNOPSIS ✨

here's the vibe β€” you let SNMP::Info do the detective work and figure out the right subclass for you, like a main character who never misses:

# Let SNMP::Info determine the correct subclass for you.
my $apc = new SNMP::Info(
                         AutoSpecify => 1,
                         Debug       => 1,
                         DestHost    => 'myswitch',
                         Community   => 'public',
                         Version     => 2
                       )
   or die "Can't connect to DestHost.\n";

my $class      = $apc->class();
print "SNMP::Info determined this device to fall under subclass : $class\n";
heads up bestie: if that connection flops, it literally dies on you with Can't connect to DestHost.\n. dramatic? yes. deserved? also yes. 😭

🌸 DESCRIPTION 🌸

so basically this module gives you abstraction to the configuration information obtainable from an APC UPS via SNMP. that's the whole gig. she's a translator, she's a vibe, she speaks UPS. ✨

πŸ¦‹ Inherited Classes

  • SNMP::Info::Layer7

just the one, and she inherited it. family tree stays tidy. 🌈

πŸŽ€ Required MIBs

  • POWERNET-MIB

and also, for the record: all required MIBs can be found in the netdisco-mibs package. go get 'em. πŸ“


πŸ‘‘ GLOBALS πŸ‘‘

these are methods that return scalar values from SNMP β€” one value, one fetch, chef's kiss πŸ’…

  • $apc->os() β€” returns 'aos'
  • $apc->os_bin() β€” gives you "POWERNET-MIB::experimental.2.4.1.4.2"
  • $apc->os_ver() β€” gives you "POWERNET-MIB::experimental.2.4.1.4.1"
  • $apc->serial() β€” combines the UPS serial "upsAdvIdentSerialNumber.0" with the management card serial "POWERNET-MIB::experimental.2.4.1.2.1" into a pretty string. it's giving glow-up ✨
  • $apc->vendor() β€” returns 'apc'
  • $apc->model() β€” gives you "upsBasicIdentModel.0"
  • $apc->ps1_type() β€” returns 'UPS status'
  • $apc->ps1_status() β€” returns the main UPS status from "upsBasicOutputStatus.0"
  • $apc->ps2_type() β€” returns 'Battery status'
  • $apc->ps2_status() β€” returns the battery status from "upsBasicBatteryStatus.0"

πŸ’œ Globals imported from SNMP::Info::Layer7

see the docs in "GLOBALS" in SNMP::Info::Layer7 for the details, bestie β€” she's got the receipts. 🫢


🌈 TABLE METHODS 🌈

these are methods that return tables of information in the form of a reference to a hash. a whole hash ref. she contains multitudes. πŸ’–

🧚 Table Methods imported from SNMP::Info::Layer7

see the documentation in "TABLE METHODS" in SNMP::Info::Layer7 for all the deets. iykyk. ⭐


πŸ”₯ SET METHODS πŸ”₯

these are methods that provide SNMP set functionality for overridden methods, or that give you a simpler interface to complex set operations. like a shortcut through the group chat. πŸŽ€

for the general tea on set operations, go read "SETTING DATA VIA SNMP" in SNMP::Info. periodt. πŸ’…


okay that's the whole page, no notes, you ate. 🌸

this beauty is from perl v5.40.1, dated 2026-02-28 β€” so if you're reading this, hi from the future, hope your UPS is healthy and your community string is public. πŸ˜­πŸ’– bye bestie! πŸ¦‹

πŸ“¦ where this page comes from