[smokeping-users] TCPPing probe doesn't generate data

G.W. Haywood ged at jubileegroup.co.uk
Sun Jun 15 20:18:37 CEST 2008


Hi there,

On Mon, 16 Jun 2008, David Tomic wrote:

> david at david-desktop:~$ /usr/bin/tcpping -C -x 5 internode.on.net 80
> 255  corp.internode.on.net (203.16.214.17) [open]  24.965 ms
>
> field 1 = 255
> field 2 = corp.internode.on.net
> field 3 = (203.16.214.17)
> field 4 = [open]
> field 5 = 24.965
> field 6 = ms
> 24.965255  corp.internode.on.net (203.16.214.17) [open]  24.291 ms
>
> [snip]
>
> That was a pretty herculean post...

Not so this time.  Duty calls so I don't have time to look further
right now.  I can see that you're getting the ping times though, and
that's good.  It might be the Perl in TCPPing.pm that doesn't strip
out the numbers correctly.  You might want to take a look yourself to
see if you can find it, otherwise I'll take a look tomorrow.  The bit
that does it is here:

        @times = split /\s+/;
        my $ip = shift @times;
# put debug statement here
        next unless ':' eq shift @times; #drop the colon

After the 'split' instruction, the Perl array @times should hold an IP
address and some times.  The 'shift' instruction takes the IP out and
puts it in the Perl scalar $ip, leaving the times in @times.  You can
put something like

print STDERR @times;

where I put the comment "put debug statement here" and then look in
the log (/var/log/messages?) to see what's in @times at that point.
Have fun.

I'm sure this is all just because the format of the output of one of
the utilities has been changed by one of the developers.  It happens
all the time.  It only takes one extra space to screw things up if the
interface between the parts is fragile.  It looks like it's fragile. :(

--

73,
Ged.



More information about the smokeping-users mailing list