etingof / pysmi

SNMP MIB parser
http://snmplabs.com/pysmi/
BSD 2-Clause "Simplified" License
132 stars 51 forks source link

mibdump.py fails on LSI-MegaRAID-SAS-MIB #37

Open wuyuwu0215 opened 6 years ago

wuyuwu0215 commented 6 years ago

Use mibdump.py to convert LSI-MegaRAID-SAS-MIB.

At first,I use the command

mibdump.py  LSI-MegaRAID-SAS-MIB

The mistake is Duplicate symbol found: bbuFRU at MIB LSI-MegaRAID-SAS-MIB.

So I download the file, changed it to make it not a duplicate part.Then I use this command

mibdump.py --mib-source http://192.168.1.170/ LSI-MegaRAID-SAS1-MIB

That's why I can run the locally modified file (LSI-MegaRAID-SAS-MIB).

The new mistake appeared no module "SNMPv2-SMI" in symbolTable at MIB LSI-MegaRAID-SAS-MIB.

I listened to some suggestions, use the command

mibdump.py --mib-source=http://mibs.snmplabs.com/asn1 LSI-MegaRAID-SAS1-MIB

It was not go, the mistake of Missing source MIBs: LSI-MegaRAID-SAS1-MIB.

etingof commented 6 years ago

Try adding two --mib-source options like this:

mibdump.py --mib-source http://192.168.1.170/ --mib-source http://mibs.snmplabs.com/asn1 LSI-MegaRAID-SAS1-MIB

The end result would be that mibdump will search first on your local site, when it can't find dependent MIBs there, it will search the second site.

wuyuwu0215 commented 6 years ago

I use the command: mibdump.py --mib-source http://192.168.1.170/ --mib-source http://mibs.snmplabs.com/asn1 LSI-MegaRAID-SAS1-MIB No successful conversion.Missing source MIBs: RFC-1212, RFC-1215, RFC1155-SMI, RFC1213-MIB, SNMPv2-CONF, SNMPv2-SMI, SNMPv2-TC. I feel there's no way to get down.A little sad.

wuyuwu0215 commented 6 years ago

The original name of the file is LSI-MegaRAID-SAS-MIB.In order to distinguish them,I rename i to LSI-MegaRAID-SAS1-MIB. I had also tried the command-- mibdump.py --mib-source http://192.168.1.170/ --mib-source http://mibs.snmplabs.com/asn1 LSI-MegaRAID-SAS-MIB.(rename it all to LSI-MegaRAID-SAS-MIB) There's the same mistake.

wuyuwu0215 commented 6 years ago

I tried it again. >mibdump.py --mib-source=http://192.168.1.170/ --mib-source=http://mibs.snmplabs.com/asn1 LSI-MegaRAID-SAS-MIB

Missing source MIBs: RFC-1212, RFC-1215, RFC1155-SMI, RFC1213-MIB, SNMPv2-CONF, SNMPv2-SMI, SNMPv2-TC Ignored MIBs: Failed MIBs: LSI-MegaRAID-SAS-MIB (no module "SNMPv2-SMI" in symbolTable at MIB LSI-MegaRAID-SAS-MIB)

etingof commented 6 years ago

Perhaps you are using some old pysmi version. Try this command:

mibdump.py --mib-source=http://192.168.1.170/ --mib-source=http://mibs.snmplabs.com/asn1/@mib@ LSI-MegaRAID-SAS-MIB

BTW, here is the documentation.

wuyuwu0215 commented 6 years ago

Oh!Yes!Thank you very much!It has been successfully converted!Cool!

YorkZ commented 4 years ago

Perhaps you are using some old pysmi version. Try this command:

mibdump.py --mib-source=http://192.168.1.170/ --mib-source=http://mibs.snmplabs.com/asn1/@mib@ LSI-MegaRAID-SAS-MIB

BTW, here is the documentation.

I also had the same problem, and @mib@ trick worked for me as well, thanks. However, my pysmi version is 0.3.4, seems to be the latest version right?

etingof commented 4 years ago

Yes, 0.3.4 is the latest release. Are you saying that without this @mib@ magic MIB search does not work for you?

YorkZ commented 4 years ago

Right, without this @mib@ magic MIB search does not work.