(snmp code) perl to python

Shabbir Ahmed shabbir1282 at gmail.com
Sun Apr 25 05:41:13 EDT 2010


hi hope all are doing good, i have code written in perl which quries
too many devices and then stores the result in mysqldb, whiel shifting
to python and googling i heared of and studied google asynch python
code, now i wanted to use it n convert my perl code to it but i have
some problem.

1. this class creates forks every snmp query and returns un ordered
result without any information that which oid returned which result,
where as in my code i query all only if a parent oid returns true, now
i dont know how to read specific oid.

algo of perl code,

read all the ips and communities from mysql then fork function for
every router so that all the equipment are queried at once, it creates
that much saperate process of equipment ips,

function that is forked:
loop for all the interfaces: check if the inteface is up
-> if so read the interface ips.
-> save result in mysql tables.

kindly help me convert this code to python or make this logic in
python.



More information about the Python-list mailing list