By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,109 Members | 1,008 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,109 IT Pros & Developers. It's quick & easy.

High level SNMP

P: n/a
Hi -

I'd like to write a program which basically does a few snmpgets. I haven't
been able to find a python package which gives you a nice high-level and
simple way of doing this (like PHP has). Everything appears to be
extremely low level. All I need is SNMPv1.

Does anyone know of a simple python package for doing this? I'd rather
have something written in pure python, so that it is easily cross-platform.

Jeremy

Jul 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Thu, 09 Dec 2004 11:15:27 +0000, Jeremy Sanders wrote:
Hi -

I'd like to write a program which basically does a few snmpgets. I haven't
been able to find a python package which gives you a nice high-level and
simple way of doing this (like PHP has). Everything appears to be
extremely low level. All I need is SNMPv1.

Does anyone know of a simple python package for doing this? I'd rather
have something written in pure python, so that it is easily cross-platform.


Hi, Jeremy

have you tested twistedsnmp?
http://twistedsnmp.sourceforge.net/

Petri

Jul 18 '05 #2

P: n/a
On Thu, 09 Dec 2004 15:34:14 +0200, Petri Laakso wrote:
have you tested twistedsnmp?

http://twistedsnmp.sourceforge.net/


I looked at it, but it needs Twisted compiled and installed, which is a
pain.

The old versions of PySNMP (version 2.XX), seem to be a lot simpler to
use than later ones, so I might do that. That's if I can work out how to
convert the random string it produces to a floating point number. Somehow
it manages to gain 3 bytes over a float...

Jeremy

Jul 18 '05 #3

P: n/a
Jeremy Sanders wrote:
Hi -

I'd like to write a program which basically does a few snmpgets. I haven't
been able to find a python package which gives you a nice high-level and
simple way of doing this (like PHP has). Everything appears to be
extremely low level. All I need is SNMPv1.

Does anyone know of a simple python package for doing this? I'd rather
have something written in pure python, so that it is easily cross-platform.

Jeremy


The pyNMS package at sourceforge has a complete SNMP (v1, v2c)
implementation. In pure Python, and fairly self contained. See

http://sourceforge.net/projects/pynms

There are few docs, sorry. If you want to use it and have any questions
then please let me know (I wrote it).

BTW, you can also read MIB files if you have libsmi installed. But the
pyNMS package contains a utility called mib2py that converts MIB objects
to Python, and the pyNMS package has most standard MIBS pre-compiled.
So, you don't really need libsmi to use the standard MIBs.
The name means Python Network Management System, and will become a
complete network management system with GUI and scriptability soon. ;-)

There is some support for creating XHTML reports, NMS web interface,
SNMP get/set, SNMP trap receiver, Ping/ICMP module, process management,
MIB browser, CLI construction kit, web protocols, easy email interface,
and asyncio framework. Works well with Linux or FreeBSD.

(PS. It can also answer your phone and take a message)

--
\/ \/
(O O)
-- --------------------oOOo~(_)~oOOo----------------------------------------
Keith Dart <kd***@kdart.com>
vcard: <http://www.kdart.com/~kdart/kdart.vcf>
public key: ID: F3D288E4 URL: <http://www.kdart.com/~kdart/public.key>
================================================== ==========================
Jul 18 '05 #4

P: n/a
Jeremy Sanders <je*************@jeremysanders.net> wrote:
On Thu, 09 Dec 2004 15:34:14 +0200, Petri Laakso wrote:
[skipped]
The old versions of PySNMP (version 2.XX), seem to be a lot simpler to
use than later ones, so I might do that. That's if I can work out how to
Recent versions tend to be more complex because they're following SNMPv3
model, which is complex. However, a simplistic high-level layer is
scheduled for implementation.
convert the random string it produces to a floating point number. Somehow
it manages to gain 3 bytes over a float...


Basic SNMP types don't seem to include floating point numbers. Maybe you're
decoding something defined by a TEXTUAL-CONVENTION at a MIB? The protocol
(for packing floating point value into some native SNMP type) might be
specified by the TC then.

If you provide more details I'm willing to help.

-ilya
Jul 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.