> On Sun, Apr 18, 2010 at 11:32 PM, erik quanstrom <quans...@quanstro.net> 
> wrote:
> >> term% for (i in `{seq 1 254}) {ip/ping -n 1 192.168.1.1&}
> >
> > i think you mean
> >
> >        for(i in `{seq 1 254}){ip/ping -n1 192.168.1.$i}
> 
> Sorry, I meant
> 
> for(i in `{seq 1 254}){ip/ping -n1 192.168.1.$i&}
> 
> I added the & as I didn't want to wait for one to timeout/succeed
> before trying the next one.

i removed the & on purpose.  if you don't want to write
your own version of ping, doing them one-at-a-time
makes the most sense.

if you want to get super fancy, you could
        batch=10
        j=()
        for(i in `{seq 1 254}){
                if(! ~ $#j $batch){
                        j=($i $j)
                        ping -i1 192.168.0.$i&
                }
                if not{
                        j=()
                        wait
                }
        }
        if(! ~ $#j 0)
                wait

what are you *really* trying to do?  if you want to find servers
on the local segment, sending udp packets to them will fill arp
tables.  no timeout required.

> I was expecting that a panic was a bug and I shouldn't be able to cause one.
> 
> I'm running a standalone system here but if I wasn't could I bring
> down the server like this or only my terminal?

sure.  that's why i said i think it can be debated if this is the
right response.  but it is definately intentional.  the problem is
that for some servers, running out of (say) tcp conversations
will make the server useless and a panic/reboot will set things
right, if we assume that the condition was temporary.

- erik

Reply via email to