1SNMP::Info::Layer7::APCU(s3e)r Contributed Perl DocumentaStNiMoPn::Info::Layer7::APC(3)
2
3
4
6 SNMP::Info::Layer7::APC - SNMP Interface to APC UPS devices
7
9 Jeroen van Ingen
10
12 # Let SNMP::Info determine the correct subclass for you.
13 my $apc = new SNMP::Info(
14 AutoSpecify => 1,
15 Debug => 1,
16 DestHost => 'myswitch',
17 Community => 'public',
18 Version => 2
19 )
20 or die "Can't connect to DestHost.\n";
21
22 my $class = $apc->class();
23 print "SNMP::Info determined this device to fall under subclass : $class\n";
24
26 Provides abstraction to the configuration information obtainable from a
27 APC UPS via SNMP.
28
29 For speed or debugging purposes you can call the subclass directly, but
30 not after determining a more specific class using the method above.
31
32 my $apc = new SNMP::Info::Layer7::APC(...);
33
34 Inherited Classes
35 SNMP::Info::Layer7
36
37 Required MIBs
38 POWERNET-MIB
39
40 All required MIBs can be found in the netdisco-mibs package.
41
43 These are methods that return scalar value from SNMP
44
45 $apc->os()
46 Returns 'aos'
47
48 $apc->os_bin()
49 "POWERNET-MIB::experimental.2.4.1.4.2"
50
51 $apc->os_ver()
52 "POWERNET-MIB::experimental.2.4.1.4.1"
53
54 $apc->serial()
55 Combines the UPS serial "upsAdvIdentSerialNumber.0" with the
56 management card serial "POWERNET-MIB::experimental.2.4.1.2.1" into
57 a pretty string.
58
59 $apc->vendor()
60 Returns 'apc'
61
62 $apc->model()
63 "upsBasicIdentModel.0"
64
65 $apc->ps1_type()
66 Returns 'UPS status'
67
68 $apc->ps1_status()
69 Returns the main UPS status from "upsBasicOutputStatus.0"
70
71 $apc->ps2_type()
72 Returns 'Battery status'
73
74 $apc->ps2_status()
75 Returns the battery status from "upsBasicBatteryStatus.0"
76
77 Globals imported from SNMP::Info::Layer7
78 See documentation in "GLOBALS" in SNMP::Info::Layer7 for details.
79
81 These are methods that return tables of information in the form of a
82 reference to a hash.
83
84 Overrides
85 Table Methods imported from SNMP::Info::Layer7
86 See documentation in "TABLE METHODS" in SNMP::Info::Layer7 for details.
87
90 These are methods that provide SNMP set functionality for overridden
91 methods or provide a simpler interface to complex set operations. See
92 "SETTING DATA VIA SNMP" in SNMP::Info for general information on set
93 operations.
94
95
96
97perl v5.28.0 2018-11-29 SNMP::Info::Layer7::APC(3)