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 literallydies on you withCan'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
- 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