0

Im having python ping numerous IP's. Upon one failed ping it sends an error code to be displayed on an LED. Going from a good ping to a failed ping can take up to 10 seconds to update. I'm looking for a faster response time there. Here's what im currently using to ping a particular server. Its on a raspberry pi of that helps, also.

response = subprocess.call(['ping', '-c', '1',ip])
Tim T
  • 13
  • 3
  • 2
    You could add `-W 2` or something to the ping invocation. – Sven Marnach Jan 27 '15 at 15:12
  • Just seen there's a [python implementation of ping](http://www.g-loaded.eu/2009/10/30/python-ping/). I've never used it however, but if it works it should fail a lot faster. – GP89 Jan 27 '15 at 15:28
  • 1
    you could [run multiple pings concurrently](http://stackoverflow.com/a/12102040/4279) – jfs Jan 27 '15 at 23:22

0 Answers0