From: Phillip Gawlowski on
On 23.01.2010 05:30, Dale Ackerman wrote:
>
> WOW! Thanks
> are those back quotes around the ping command?

Yup.

--
Phillip Gawlowski

From: Jonathan Nielsen on
If you want to access stderr, look at the ruby api docs for popen3.
It's a little more complicated than the backticks but it'll get you
access to stderr.

-Jonathan Nielsen

From: Dale Ackerman on
Jonathan Nielsen wrote:
> If you want to access stderr, look at the ruby api docs for popen3.
> It's a little more complicated than the backticks but it'll get you
> access to stderr.
>
> -Jonathan Nielsen

No it looks like the back-ticks will be fine

I have this in a loop

results = `ping -s #{bytes} -c 1 -D #{host}`


the code runs fine localhost and on my godaddy IP hoever it blows up on
another site. But I am not confident I am doing this right so How can I
tell if its my code or a valid black-hole MTU?

Thanks
--
Posted via http://www.ruby-forum.com/.

From: brabuhr on
On Sat, Jan 23, 2010 at 1:39 AM, Dale Ackerman <dale8458(a)gmail.com> wrote:
> I have this in a loop
>
> results = `ping -s #{bytes} -c 1 -D #{host}`
>
> the code runs fine localhost and on my godaddy IP  hoever it blows up on
> another site.  But I am not confident I am doing this right so How can I
> tell if its my code or a valid black-hole MTU?

"blows up" in what way?

From: Dale Ackerman on
unknown wrote:
>
> "blows up" in what way?

I know that was not very descriptive. I meant to say that the ping its
self failed. I think it is a couple of things none of which is an
error.

1.) The target host blocked pings after a certain count example Site5
does this.

2.) My ping loop is running to fast at which point the host declines and
the ping fails

3.) It's a black hole which is what we are trying to detect.

It looks good now I have it working for Linux, Unix, OS X, BSD, and
Windows...


Thanks you all for your help. Oh I'll share code if anyone is
interested. Not a big deal .. . .

-dale



--
Posted via http://www.ruby-forum.com/.