From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Sun, 18 Apr 2010 17:19:47 -0400 To: 9fans@9fans.net Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Subject: Re: [9fans] multiple pings cause panic Topicbox-Message-UUID: 07a0e5d4-ead6-11e9-9d60-3106f5b1d025 > On Sun, Apr 18, 2010 at 11:32 PM, erik quanstrom 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