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
0
votes
2 answers

How to walk between to oids in pysnmp

I have the following code: cmdGen = cmdgen.AsynCommandGenerator() cmdGen.asyncNextCmd( cmdgen.CommunityData('public', mpModel=0), cmdgen.UdpTransportTarget((ip, 161)), ((1,3,6,1,2,1,2,2,1,6,1),),#walks from this oid…
yuval
  • 2,848
  • 4
  • 31
  • 51
0
votes
1 answer

Python 3.4 PYSNMP Set issues

Python 3.4 - Latest version of PYSNMP ( pip --update ) Having issues setting ifAlias values using PYSNMP library. Hoping that someone might be able to shed light on why I'm getting errors in the second function. Verified that this OID is…
netmanchris
  • 163
  • 1
  • 1
  • 8
0
votes
1 answer

pysnmp nextcmd stops on timeout

I am trying to perform a snmp walk on certain networking devices. On some netwroking devices I succeed to go through all the devices oids and on some networking devices I don't succeed to go through all the devices oids. Here is my code: cmdGen…
yuval
  • 2,848
  • 4
  • 31
  • 51
0
votes
1 answer

Using SNMP, trying to get to the data in a TP-LINK modem

The other day, a modem broke down, and I acquired a new TP-LINK TD8816 to replace it. I've been trying to get my feet wet in SNMP to get at the modem stats. Here are the steps I took: I enabled SNMP in the modem, on the LAN port only. I installed…
jcoppens
  • 5,306
  • 6
  • 27
  • 47
0
votes
0 answers

How to do exception handling on multiprocessing python

I use multiprocessing in my python code. My python code imports Pysnmp and multiprocessing. Half of the time my code runs smoothly. But unfortunately half of the other time my code doesn't work and shows the exception "pyasn1.error.pyasn1 error:…
yuval
  • 2,848
  • 4
  • 31
  • 51
0
votes
1 answer

Making PySNMP resolve Object IDs

I'm trying to do a SNMP-walk with PySNMP. I wrote the following script, which works, but for every device I "walk" the OIDs of only about ten rows can be resolved to a "real name". from pysnmp.entity.rfc3413.oneliner import cmdgen from os.path…
vicco
  • 1,049
  • 2
  • 14
  • 33
0
votes
0 answers

PySNMP walk - leave out maxRows parameter?

I'm trying to do a SNMP walk with a script based on the examples given by the PySNMP developers. My code looks like this from pysnmp.entity.rfc3413.oneliner import cmdgen from os.path import exists import sys import os # Turn on…
vicco
  • 1,049
  • 2
  • 14
  • 33
0
votes
1 answer

Doing a complete nextCmd scan with PySNMP

I'm trying to scan a device in my network with PySNMP and want to do a extensive walk through the MIB tree and see what I can find. For this I wrote a script, which works quite well, but it does not finish the task. from…
vicco
  • 1,049
  • 2
  • 14
  • 33
0
votes
2 answers

Parsing Pysnmp with regex

I need to parse the Pysnmp output. I want to run the script from web browser. So the code is as follow: #! /usr/bin/python # print "Content-Type: text/html\n\n" print '' print 'Interface…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/python" class="post-tag grid--cell" title="show questions tagged 'python'" rel="tag">python</a> <a href="../../questions/tagged/regex" class="post-tag grid--cell" title="show questions tagged 'regex'" rel="tag">regex</a> <a href="../../questions/tagged/pysnmp" class="post-tag grid--cell" title="show questions tagged 'pysnmp'" rel="tag">pysnmp</a> <a href="../../questions/tagged/python-webbrowser" class="post-tag grid--cell" title="show questions tagged 'python-webbrowser'" rel="tag">python-webbrowser</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Feb 26 '15 at 18:50">asked Feb 26 '15 at 18:50</time> <a href="../../users/3166426/jeronimo777" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/3166426.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="jeronimo777" /> </a> <div class="s-user-card--info"> <a href="../../users/3166426/jeronimo777" class="s-user-card--link">jeronimo777</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">3</li> <li class="s-award-bling s-award-bling__bronze" title="4 bronze badges">4</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-28303440"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>0</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/28303440/pysnmp-send-timeout-when-called-from-django-view" class="question-hyperlink">pysnmp send timeout when called from django view</a></h3> <div class="excerpt">Im reitryng to get some kids from some network switch and for that im using a purepyton library called pysnmp. its installed w/o problems. Used a sample code that works. from pysnmp.entity.rfc3413.oneliner import cmdgen cmdGen =…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/python" class="post-tag grid--cell" title="show questions tagged 'python'" rel="tag">python</a> <a href="../../questions/tagged/django" class="post-tag grid--cell" title="show questions tagged 'django'" rel="tag">django</a> <a href="../../questions/tagged/pysnmp" class="post-tag grid--cell" title="show questions tagged 'pysnmp'" rel="tag">pysnmp</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Feb 03 '15 at 16:05">asked Feb 03 '15 at 16:05</time> <a href="../../users/260971/freaktor" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/260971.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Freaktor" /> </a> <div class="s-user-card--info"> <a href="../../users/260971/freaktor" class="s-user-card--link">Freaktor</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">700</li> <li class="s-award-bling s-award-bling__gold" title="1 gold badge">1</li> <li class="s-award-bling s-award-bling__silver" title="10 silver badge">10</li> <li class="s-award-bling s-award-bling__bronze" title="21 bronze badge">21</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-27912764"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>0</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/27912764/pysnmp-mib2dev-py-failing" class="question-hyperlink">pysnmp mib2dev.py failing</a></h3> <div class="excerpt">Good day, I am trying to generate a simulator for snmpsim using the mib2dev.py tool in pysnmp. I keep getting a ValueError: Empty module name and am not sure why. I have ensured that I have the latest pysnmp, pycrypt, and snmpsim. I am running on…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/python" class="post-tag grid--cell" title="show questions tagged 'python'" rel="tag">python</a> <a href="../../questions/tagged/python-2.7" class="post-tag grid--cell" title="show questions tagged 'python-2.7'" rel="tag">python-2.7</a> <a href="../../questions/tagged/snmp" class="post-tag grid--cell" title="show questions tagged 'snmp'" rel="tag">snmp</a> <a href="../../questions/tagged/pysnmp" class="post-tag grid--cell" title="show questions tagged 'pysnmp'" rel="tag">pysnmp</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Jan 12 '15 at 23:50">asked Jan 12 '15 at 23:50</time> <a href="../../users/2262160/houckrj" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/2262160.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="houckrj" /> </a> <div class="s-user-card--info"> <a href="../../users/2262160/houckrj" class="s-user-card--link">houckrj</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">118</li> <li class="s-award-bling s-award-bling__silver" title="1 silver badges">1</li> <li class="s-award-bling s-award-bling__bronze" title="12 bronze badges">12</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-27081314"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>0</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/27081314/trouble-grasping-mibs-with-pysnmp" class="question-hyperlink">Trouble grasping MIBs with PySNMP</a></h3> <div class="excerpt">I am fairly new to the SNMP protocol and have only been introduced to it recently in my computer networking course. I understand how the manager sends Gets, Sets, GetNext, GetBulk and all that, it will catch Traps and such. One thing I don't…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/python" class="post-tag grid--cell" title="show questions tagged 'python'" rel="tag">python</a> <a href="../../questions/tagged/snmp" class="post-tag grid--cell" title="show questions tagged 'snmp'" rel="tag">snmp</a> <a href="../../questions/tagged/conceptual" class="post-tag grid--cell" title="show questions tagged 'conceptual'" rel="tag">conceptual</a> <a href="../../questions/tagged/mib" class="post-tag grid--cell" title="show questions tagged 'mib'" rel="tag">mib</a> <a href="../../questions/tagged/pysnmp" class="post-tag grid--cell" title="show questions tagged 'pysnmp'" rel="tag">pysnmp</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Nov 22 '14 at 19:06">asked Nov 22 '14 at 19:06</time> <a href="../../users/1330595/funkyguy" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/1330595.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Funkyguy" /> </a> <div class="s-user-card--info"> <a href="../../users/1330595/funkyguy" class="s-user-card--link">Funkyguy</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">628</li> <li class="s-award-bling s-award-bling__gold" title="2 gold badges">2</li> <li class="s-award-bling s-award-bling__silver" title="10 silver badges">10</li> <li class="s-award-bling s-award-bling__bronze" title="31 bronze badges">31</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-27062622"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>0</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/27062622/how-make-pysmp-oids-respone-readable-for-human" class="question-hyperlink">how make pysmp oids respone readable for human</a></h3> <div class="excerpt">I create some smnp agent which will be use pysnmp to get response with OID. How I can make response OID readable for human with pysnmp? Example command generator: cmdGen = cmdgen.CommandGenerator() errorIndication, errorStatus, errorIndex,…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/python" class="post-tag grid--cell" title="show questions tagged 'python'" rel="tag">python</a> <a href="../../questions/tagged/python-2.7" class="post-tag grid--cell" title="show questions tagged 'python-2.7'" rel="tag">python-2.7</a> <a href="../../questions/tagged/snmp" class="post-tag grid--cell" title="show questions tagged 'snmp'" rel="tag">snmp</a> <a href="../../questions/tagged/pysnmp" class="post-tag grid--cell" title="show questions tagged 'pysnmp'" rel="tag">pysnmp</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Nov 21 '14 at 13:33">asked Nov 21 '14 at 13:33</time> <a href="../../users/3928560/martinp" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/3928560.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="MartinP" /> </a> <div class="s-user-card--info"> <a href="../../users/3928560/martinp" class="s-user-card--link">MartinP</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">527</li> <li class="s-award-bling s-award-bling__silver" title="5 silver badges">5</li> <li class="s-award-bling s-award-bling__bronze" title="17 bronze badges">17</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-26310325"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>0</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>2</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/26310325/pysnmp-mac-to-human-readable" class="question-hyperlink">pysnmp mac to human readable</a></h3> <div class="excerpt">I am using pysnmp to get a list of IP and mac address from ipNetToMediaPhysAddress This is working with no issue. I have a problem however converting the mac address to human readable one. the SNMP code has caused the mac to appear…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/python" class="post-tag grid--cell" title="show questions tagged 'python'" rel="tag">python</a> <a href="../../questions/tagged/python-3.x" class="post-tag grid--cell" title="show questions tagged 'python-3.x'" rel="tag">python-3.x</a> <a href="../../questions/tagged/pysnmp" class="post-tag grid--cell" title="show questions tagged 'pysnmp'" rel="tag">pysnmp</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Oct 11 '14 at 02:08">asked Oct 11 '14 at 02:08</time> <a href="../../users/2046700/clonerworks" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/2046700.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="clonerworks" /> </a> <div class="s-user-card--info"> <a href="../../users/2046700/clonerworks" class="s-user-card--link">clonerworks</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">641</li> <li class="s-award-bling s-award-bling__gold" title="1 gold badge">1</li> <li class="s-award-bling s-award-bling__silver" title="6 silver badge">6</li> <li class="s-award-bling s-award-bling__bronze" title="16 bronze badge">16</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-26035619"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>0</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/26035619/pysnmp-send-hex-string-in-trap" class="question-hyperlink">pysnmp: send hex string in trap</a></h3> <div class="excerpt">What I want is to send snmp traps just as the way that one of our network equipment do. The trap contains a name-value of DataTime and it's something like HEX String. e.g. 1.3.6.1.4.1.193.82.1.8.1.4.0 : 07:de:07:10:0a:0c:1e:00:2b:08:00 When I use…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/python" class="post-tag grid--cell" title="show questions tagged 'python'" rel="tag">python</a> <a href="../../questions/tagged/snmp" class="post-tag grid--cell" title="show questions tagged 'snmp'" rel="tag">snmp</a> <a href="../../questions/tagged/net-snmp" class="post-tag grid--cell" title="show questions tagged 'net-snmp'" rel="tag">net-snmp</a> <a href="../../questions/tagged/pysnmp" class="post-tag grid--cell" title="show questions tagged 'pysnmp'" rel="tag">pysnmp</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Sep 25 '14 at 09:54">asked Sep 25 '14 at 09:54</time> <a href="../../users/3373627/lowitty" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/3373627.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="lowitty" /> </a> <div class="s-user-card--info"> <a href="../../users/3373627/lowitty" class="s-user-card--link">lowitty</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">904</li> <li class="s-award-bling s-award-bling__gold" title="1 gold badge">1</li> <li class="s-award-bling s-award-bling__silver" title="8 silver badge">8</li> <li class="s-award-bling s-award-bling__bronze" title="13 bronze badge">13</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="s-pagination pager fr"> <a class="s-pagination--item" href="../../questions/tagged/pysnmp_page=28" rel="prev" title="Go to page 28">Prev </a> <a class="s-pagination--item" href="../../questions/tagged/pysnmp_page=1" rel="" title="Go to page 1">1</a> <a class="s-pagination--item" href="../../questions/tagged/pysnmp_page=2" rel="" title="Go to page 2">2</a> <a class="s-pagination--item" href="../../questions/tagged/pysnmp_page=3" rel="" title="Go to page 3">3</a> <div class="s-pagination--item s-pagination--item__clear">…</div> <a class="s-pagination--item" href="../../questions/tagged/pysnmp_page=31" rel="" title="Go to page 31">31</a> <a class="s-pagination--item" href="../../questions/tagged/pysnmp_page=32" rel="" title="Go to page 32">32</a> <a class="s-pagination--item" href="../../questions/tagged/pysnmp_page=30" rel="next" title="Go to page 30"> Next</a> </div> </div> </div> </div> </div> <script src="../../static/js/stack-icons.js"></script> <script src="../../static/js/fromnow.js"></script> </body> </html>