1SNMP::Info::Layer2::HP4U0s0e0r(3C)ontributed Perl DocumeSnNtMaPt:i:oInnfo::Layer2::HP4000(3)
2
3
4

NAME

6       SNMP::Info::Layer2::HP4000 - SNMP Interface to older HP ProCurve
7       Switches (1600, 2400, 2424M, 4000 and 8000)
8

AUTHOR

10       Max Baker
11

SYNOPSIS

13        # Let SNMP::Info determine the correct subclass for you.
14        my $hp = new SNMP::Info(
15                                 AutoSpecify => 1,
16                                 Debug       => 1,
17                                 DestHost    => 'myswitch',
18                                 Community   => 'public',
19                                 Version     => 2
20                               )
21           or die "Can't connect to DestHost.\n";
22
23        my $class      = $hp->class();
24        print "SNMP::Info determined this device to fall under subclass : $class\n";
25

DESCRIPTION

27       Provides abstraction to the configuration information obtainable from a
28       HP ProCurve Switch via SNMP.
29
30       Note:  Some HP Switches will connect via SNMP version 1, but a lot of
31       config data will not be available.  Make sure you try and connect with
32       Version 2 first, and then fail back to version 1.
33
34       For speed or debugging purposes you can call the subclass directly, but
35       not after determining a more specific class using the method above.
36
37        my $hp = new SNMP::Info::Layer2::HP4000(...);
38
39   Inherited Classes
40       SNMP::Info::Layer2
41       SNMP::Info::MAU
42
43   Required MIBs
44       RFC1271-MIB
45           Included in V2 mibs from Cisco
46
47       HP-ICF-OID
48       HP-VLAN
49           (this MIB new with SNMP::Info 0.8)
50
51       STATISTICS-MIB
52       NETSWITCH-MIB
53       CONFIG-MIB
54
55       The last five MIBs listed are from HP and can be found at
56       <http://www.hp.com/rnd/software> or
57       <http://www.hp.com/rnd/software/MIBs.htm>
58

Change Log

60       Version 0.4 - Removed ENTITY-MIB e_*() methods to separate sub-class -
61       SNMP::Info::Entity
62

GLOBALS

64       These are methods that return scalar value from SNMP
65
66       $hp->cpu()
67           Returns CPU Utilization in percentage.
68
69       $hp->log()
70           Returns all the log entries from the switch's log that are not Link
71           up or down messages.
72
73       $hp->mem_free()
74           Returns bytes of free memory
75
76       $hp->mem_total()
77           Return bytes of total memory
78
79       $hp->mem_used()
80           Returns bytes of used memory
81
82       $hp->model()
83           Returns the model number of the HP Switch.  Will translate between
84           the HP Part number and the common model number with this map :
85
86            %MODEL_MAP = (
87                           'J4093A' => '2424M',
88                           'J4110A' => '8000M',
89                           'J4120A' => '1600M',
90                           'J4121A' => '4000M',
91                           'J4122A' => '2400M',
92                           'J4122B' => '2424M',
93                           );
94
95       $hp->os()
96           Returns hp
97
98       $hp->os_bin()
99           "hpSwitchRomVersion.0"
100
101       $hp->os_ver()
102           Tries to use os_version() and if that fails will try and cull the
103           version from the description field.
104
105       $hp->os_version()
106           "hpSwitchOsVersion.0"
107
108       $hp->serial()
109           Returns serial number if available through SNMP
110
111       $hp->slots()
112           Returns number of entries in $hp->e_name that have 'slot' in them.
113
114       $hp->vendor()
115           hp
116
117       $hp->fan()
118           Returns fan status
119
120       $hp->ps1_status()
121           Power supply 1 status
122
123       $hp->ps2_status()
124           Power supply 2 status
125
126   Globals imported from SNMP::Info::Layer2
127       See documentation in "GLOBALS" in SNMP::Info::Layer2 for details.
128
129   Globals imported from SNMP::Info::MAU
130       See documentation in "GLOBALS" in SNMP::Info::MAU for details.
131

TABLE METHODS

133       These are methods that return tables of information in the form of a
134       reference to a hash.
135
136   Overrides
137       $hp->interfaces()
138           Uses $hp->i_description()
139
140       $hp->i_duplex()
141           Returns reference to map of IIDs to current link duplex.
142
143       $hp->i_duplex_admin()
144           Returns reference to hash of IIDs to admin duplex setting.
145
146       $hp->vendor_i_type()
147           Returns reference to hash of IIDs to HP specific port type
148           ("hpSwitchPortType").
149
150       $hp->i_name()
151           Crosses i_name() with $hp->e_name() using $hp->e_port() and
152           i_alias()
153
154       $hp->i_vlan()
155           Returns a mapping between "ifIndex" and the PVID (default VLAN) or
156           untagged port when using HP-VLAN.
157
158       $hp->i_vlan_membership()
159           Returns reference to hash of arrays: key = "ifIndex", value = array
160           of VLAN IDs.  These are the VLANs which are members of the egress
161           list for the port.  It is the union of tagged, untagged, and auto
162           ports.
163
164             Example:
165             my $interfaces = $hp->interfaces();
166             my $vlans      = $hp->i_vlan_membership();
167
168             foreach my $iid (sort keys %$interfaces) {
169               my $port = $interfaces->{$iid};
170               my $vlan = join(',', sort(@{$vlans->{$iid}}));
171               print "Port: $port VLAN: $vlan\n";
172             }
173
174       $hp->i_vlan_membership_untagged()
175           Returns reference to hash of arrays: key = "ifIndex", value = array
176           of VLAN IDs.  These are the VLANs which are members of the untagged
177           egress list for the port.
178
179       $hp->v_index()
180           Returns VLAN IDs
181
182       $hp->v_name()
183           Returns VLAN names
184
185       $hp->bp_index()
186           Returns reference to hash of bridge port table entries map back to
187           interface identifier (iid)
188
189           Returns ("ifIndex") for both key and value for 1600, 2424, 4000,
190           and 8000 models since they seem to have problems with BRIDGE-MIB
191
192   Table Methods imported from SNMP::Info::Layer2
193       See documentation in "TABLE METHODS" in SNMP::Info::Layer2 for details.
194
195   Table Methods imported from SNMP::Info::MAU
196       See documentation in "TABLE METHODS" in SNMP::Info::MAU for details.
197

SET METHODS

199       These are methods that provide SNMP set functionality for overridden
200       methods or provide a simpler interface to complex set operations.  See
201       "SETTING DATA VIA SNMP" in SNMP::Info for general information on set
202       operations.
203
204       set_i_vlan()
205       set_i_vlan_tagged()
206
207
208
209perl v5.28.0                      2018-11-29     SNMP::Info::Layer2::HP4000(3)
Impressum