etingof / pysnmp

Python SNMP library
http://snmplabs.com/pysnmp/
BSD 2-Clause "Simplified" License
584 stars 200 forks source link

Why not use subprocess with Net-SNMP shell instead of using pysnmp? #247

Open xx-zhang opened 5 years ago

xx-zhang commented 5 years ago

I have trid it like snmpget/snmpwalk and get the result string, then make it format by what I want in regex.

I have a question: what is the condition when I should use pynmap? What's the advantage of pysnmp over running snmpwalk in a subprocess?

etingof commented 5 years ago

Well, running external program usually involves some complications:

But, on the other hand, running machine code on the bare metal is definitely much faster than running it on top of Python VM.

So it all depends on your use-case.