From: Phillip Gawlowski on 22 Jan 2010 23:49 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 23 Jan 2010 00:18 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 23 Jan 2010 01:39 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 23 Jan 2010 08:54 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 23 Jan 2010 21:13 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/.
First
|
Prev
|
Pages: 1 2 Prev: New gem snmpstats Next: search datetime column for all records that start at 11:00 |