Processing snmp data...
Meehan, Francois
Francois at iecholden.com
Thu Nov 28 13:34:42 EST 2002
Hi all,
I need to process snmp data. I have installed SNMPY, but did not find
documentation for it. Then tried PYSNMP but I am a beginner at python and
found it way too complicated...
I tried using the following:
cmd = '/usr/bin/snmpwalk ' + server + ' ' + community + ' ' +
'.1.3.6.1.4.1.311.1.1.3.1.1.5.1.4'
res = commands.getstatusoutput(cmd)
That returns a list, and the items that I need are part of a big string:
enterprises.311.1.1.3.1.1.5.1.4.6.48.58.48.58.67.58 = 907
enterprises.311.1.1.3.1.1.5.1.4.6.48.58.48.58.68.58 = 4633
enterprises.311.1.1.3.1.1.5.1.4.13.95.84.111.116.97.108.58.95.84.111.116.97.
108 = 5540
I just need what is after the "=" sign.
How can I extract these values?
Should I use SNMPY instead? If so, were can I find documentation about it?
Thanks in advance, your "humble" newbee,
Francois Meehan
More information about the Python-list
mailing list