0

I have a HP 2626 switch and want to monitor it by SNMP. how can i use the MIB file.
Any starting points on how to understand it ?
using snmpwalk to get the data in a *nix machine and output it in a .txt file

How can i get a list of all the connected mac-addresses and coresponding ports by snmp from a HP Procurve 2626 ? And then how can i get current port utilization by SNMP?

s.mihai
  • 1,511
  • 6
  • 24
  • 27

2 Answers2

1

See here: https://web.archive.org/web/20090323043038/http://www.sifizm.com/2009/02/19/using-snmpget-or-snmpwalk-and-a-vendor-mib-file/

First, copy your .mib file into the directory where your script is located.

Then use snmpget in the following format:

snmpget [address] -c [community string] -v 1 -m [mib name] [object to scan]

Then use snmpwalk in the following format:

snmpwalk [address] -c [community string] -v 1 -m [mib name] [object to scan]

On most Linux systems, the MIB files should go to /usr/share/snmp/mibs or probably /usr/local/share/snmp/mibs.

Neil
  • 103
  • 3
weeheavy
  • 4,089
  • 1
  • 28
  • 41
  • 1
    You can also `export MIBS=ALL` so snmpwalk will read every MIB in `/usr/share/snmp/mibs` without having to list them all on the command line. Useful since HP probably gave you +/-8 billion MIB files. – eater Jan 10 '11 at 11:56
  • yea' i have like 2 dozen files and will take ages to read them out :)) – s.mihai Jan 10 '11 at 12:35
  • The link is dead. – bk201 Aug 10 '20 at 00:36
1

Put STRANGE-NEW-MIB.txt in the directory where all your other MIBs are stored (possibly /usr/share/snmp/mibs , but it may vary with distro, mine is Fedora 14), then do

snmpwalk -v 1 -c public -m +STRANGE-NEW-MIB 1.2.3.4

where you replace public with the real RO community strong, STRANGE-NEW-MIB is the name of your new MIB without the .txt suffix (if memory serves), and 1.2.3.4 is the IP address of your switch.

MadHatter
  • 79,770
  • 20
  • 184
  • 232