Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Simultaneous pinging

    When i try to perform a ping to a large number of hosts, like so

    for i in `cat hosts`
    `ping $i -c 2 &> /tmp/pingresult_$i` & # Note the ampersand to run in background

    // do some parsing of output

    the first 4 or 5 hosts will be 'pinged' but the next hosts wont be pinged until some of the currently running pings are finished. It would appear that there is a maximum number of pings that can be performed at any one time (maybe a limitation on the number of raw sockets used?).... Can anyone explain how I might increase this limitation?

    Thanks in advance.

  2. #2
    For the sake of forum completeness (someone experiencing the same problem may find this forum question in the future!) here's an update....

    I've decided to just use the fping project ( to ping the sites in parallel, but do without the ability to set ttl and tos available in the simple ping utility.... (unless it is actually possible to do this with fping, but I'm yet to discover this!)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts