Questions tagged [pysnmp]

PySNMP is a pure Python module used for SNMP operations.

PySNMP

PySNMP is a pure-Python module that can talk SNMPv1/v2/v3, automatically download and parse MIBs via pysmi and is designed with asynchronous applications in mind (e.g. asyncio).

Its source code spans over multiple GitHub repositories and you can get started from https://github.com/etingof/pysnmp

As the original project owner passed away, future ownership is to be determined. More details can be found in https://github.com/etingof/pysnmp/issues/429

477 questions
4
votes
1 answer

How do I convert my private MIB files into .py format so that I can perform GET/SET actions on my device

I am trying to write a script that will perform GET/SET commands on my device. While I have tried to do GET action on sysDescr (which is part of the standard MIB SNMPv2) I managed to get a response. I have tried to use the mibdump.py script in…
Moshe S.
  • 2,834
  • 3
  • 19
  • 31
4
votes
2 answers

How to implement mib module in net-snmp with python?

in the faq, i read this "..the agent can also support MIB modules implemented in perl or (from 5.4) python." I have built net-snmp with python support, but it's not clear yet how to actually implement my own MIB module with python now. The python…
Tom Carly
  • 41
  • 1
  • 3
4
votes
1 answer

python pysnmp use list of oids in getbulk

Hi all im looking for a solution to get multiple oids at the same time. for example is it possible to use list of oids in pysnmp get command generator? from this: cmdGen = cmdgen.CommandGenerator() errorIndication, errorStatus, errorIndex,…
user1229351
  • 1,985
  • 4
  • 20
  • 24
3
votes
2 answers

Translating pysnmp numerical oid output into symbolic names

I wrote a script (below) to test how well I could use pysnmp in one of my applications. I need to be able to mib-walk network elements with names like ifDescr, and my output needs to reference the same name I queried with... from pysnmp.smi import…
Mike Pennington
  • 41,899
  • 19
  • 136
  • 174
3
votes
2 answers

Libraries not imported when creating a Python executable with pyinstaller

I am trying to build a Python .exe for Windows and am able to create it fine. However, when I run the application, I notice that it cannot perform all of its functions because not all the libraries were imported; PySNMP is not getting imported in…
Jenny
  • 31
  • 1
  • 2
3
votes
2 answers

How to see the pysnmp version in Linux terminal without using pip

I have installed the pysnmp module in Linux. I want to know which version of the pysnmp is got installed. How can I see the pysnmp version through the Linux terminal..? pysnmp -V did not work. I haven't pip installed in my linux, so pip show pysnmp…
Sabin Chacko
  • 713
  • 6
  • 17
3
votes
1 answer

build-pysnmp-mib: convert cisco mib files to a python fails on Ubuntu 14.04

I'm trying to convert some .my files from the cisco site to .py files to use with pysnmp application but each one is failing. ftp://ftp.cisco.com/pub/mibs/supportlists/wlc/wlc-supportlist.html I have already set my SMIPATH to the current directory…
jedatt01
  • 43
  • 1
  • 6
3
votes
2 answers

from pysnmp.hlapi import * ImportError: No module named hlapi

I install the package and it dependencies module in ubuntu 15.10 but still it show error of from pysnmp.hlapi import * ImportError: No module named hlapi I try to install it sudo setup.py install and pip install pysnmp But still its not…
Munawar Hussian
  • 287
  • 1
  • 4
  • 12
3
votes
1 answer

Translate OID value pairs from MIB textual convention using pysnmp

I am trying to write a piece of code that accepts a JSON object with OIDs as keys and OID values as values. An Example would be: {".1.3.6.1.4.1.562.29.6.2.3": "Link Down", ... } When this JSON object is received I want to translate the OID and…
user3530640
  • 85
  • 1
  • 5
3
votes
2 answers

PySNMP change output format

For better performance I have to migrate my bash script to python script... So I begin to use pysnmp and I'm facing an issue about output format... You will find below netsnmp request: snmpwalk -v 2c -c mycommunity 192.168.2.20…
Vender Aeloth
  • 690
  • 1
  • 12
  • 27
3
votes
1 answer

How to avoid high CPU usage with pysnmp

I am using pysnmp and have encountered high CPU usage. I know netsnmp is written in C and pysnmp in Python, so I would expect the CPU usage times to be about 20-100% higher because of that. Instead I am seeing 20 times higher CPU usage times. Am I…
johndodo
  • 17,247
  • 15
  • 96
  • 113
3
votes
1 answer

Is pysnmp thread-safe?

If I want to execute concurrent pysnmp threads with cmdgen.CommandGenerator().nextCmd(), is pysnmp thread-safe? When I test it, I have not seen issues that would indicate a problem; however, I have not run pysnmp with threading before and the…
Mike Pennington
  • 41,899
  • 19
  • 136
  • 174
2
votes
1 answer

How to use pysnmp to monitor system resources?

Hello I am new to python and snmp and I was wondering how can I use pysnmp to monitor system resources such as CPU usage, Memory usuage, Disk usage and NIC Load? I am experimenting with the cmdgen.CommandGenerator().getCmd() but having a hard time…
Foo
  • 293
  • 1
  • 3
  • 14
2
votes
1 answer

PySNMP Errors when working with MIB files

I'm attempting to use MIB files in PySNMP. The code is fairly straightforward. Nothing complex. Just trying to get the information under an OID. The code I'm using is as follows: #!/usr/local/bin/python2.7 from pysnmp.smi import builder, view,…
Drahkar
  • 1,694
  • 13
  • 17
2
votes
0 answers

No module named 'pysnmp.smi'; 'pysnmp' is not a package

I've been working on pysnmp agent and downloaded a script from here: https://pypi.org/project/snmp-agent/#description . And I can't get it working. When I try to run its python script, this is what I got PS…
1
2
3
31 32