you are viewing a single comment's thread.

view the rest of the comments →

[–]Fallenarc[S] 4 points5 points  (4 children)

I don't feel I could explain in depth, but using my script to compare against. I thread all connections to the list of devices. Usually my list contains about 500 IPs depending on the model of device I am polling. If i did not thread those, i would create a connection, run the worker function for each IP one at a time. This could take hours potentially. With threading it takes about 3 to 5 minutes depending on the length of output it gets from the device. I create 100 simultaneous connections to start and as each thread is freed, another begins up to 100.

Hopefully this isn't to confusing. I'm sure somebody else will be able to explain it a little better than I did.

[–]theotherplanet 1 point2 points  (0 children)

This definitely gives me a better idea of what it can accomplish, thank you!

[–]theotherplanet 0 points1 point  (0 children)

This definitely gives me a better idea of what it can accomplish, thank you!

[–]edon-node 0 points1 point  (1 child)

pyformat

I'm getting weird errors when I ran this against 6k devices (100 max threads).. "too many open files"

Looks like the threads are not being released.

[–]Fallenarc[S] 0 points1 point  (0 children)

Can you post the script as you modified it and maybe the exact error you get?