###pysnmp_sample
####How to use pysnmp (ink to pysnmp http://pysnmp.sourceforge.net)
-
Refer to installation.md on how to install dependencies and pysnmp itself
-
The libsmi was installed at ~/snmp/apps, pyasn1 and pysnmp at python site-packages
-
The libsmi is used to convert .mib files to .py files
-
Convert using the command
~/snmp/apps/bin/smidump -f python mibfile.mib | libsmi2pysnmp > filename.py
Where mibfile.mib is the mib file and filename.py is the corresponding python file that will be used by pysnmp
-
Note libsmi2pysnmp will be installed by pysnmp installation
-
Example using the SAMPLEMIB.mib
~/snmp/apps/bin/smidump -f python SAMPLEMIB.mib | > libsmi2pysnmp SAMPLEMIB.py