sassanp / pynetinfo

Python module for retrieving network information
http://pypi.python.org/pypi/pynetinfo/
GNU General Public License v2.0
11 stars 10 forks source link

netinfo.get_routes() will cause a big problem #6

Open zipandrar opened 7 years ago

zipandrar commented 7 years ago

tested in ubuntu12 ,ubuntu14 or centos6

if you run

while 1: time.sleep(0.01) routetuple=netinfo.get_routes()

run it some minutes

it will cause a error like "too many open files" it is really a big problem...

pyroute2 have get_routes() too it will not get that error

but netinfo.get_routes() is faster than pyroute2's get_routes()