>> The --debug-daemon is of little help, as it generates indo only at
>> startup, and no line of this info contains the string "tcp".
>
>Did you look in the syslog?
Oh, I was too hasty. After a while the syslog got populated and we have
some hints, appended below.
>Please include the --debug output, that should be just as good.
Appended as well.
>I'm not a big fan of the script, it's grossly inefficient. It would be
>better to run tcptraceroute straight from a Smokeping probe rather
>than have a shell script in between that emulates fping output.
It is inefficient, yes, but in fact it hardly makes a difference. As a
default, it is run once every five minutes, and I do not think that its
overhead is significant with respect to the Apache - Perl - cgi global
overhead. By the way, the hping3 program rather than tcptraceroute
should be used, probably. Anyway, using tcptraceroute rather than
tcpping would make installation easier.
This is the output of a tcpping run. Comment below.
===File /r...@ala:/tmp/a====================================
Nov 16 12:13:19 ala smokeping[31336]: TCPPing: Executing /usr/local/bin/tcpping
-C -x 20 imap.isti.cnr.it 220
Nov 16 12:13:19 ala smokeping[31339]: TCPPing: Executing /usr/local/bin/tcpping
-C -x 20 pop.isti.cnr.it 110
Nov 16 12:13:41 ala smokeping[17131]: TCPPing: pop.isti.cnr.it: got
Nov 16 12:13:41 ala smokeping[17131]: TCPPing: imap.isti.cnr.it: got
Nov 16 12:13:41 ala smokeping[17131]: Calling
RRDs::update(/var/lib/smokeping/isti/istiservs/imap.rrd --template
uptime:loss:median:ping1:ping2:ping3:ping4:ping5:ping6:ping7:ping8:ping9:ping10:ping11:ping12:ping13:ping14:ping15:ping16:ping17:ping18:ping19:ping20
1258370021:U:20:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U)
Nov 16 12:13:41 ala smokeping[17131]: Calling
RRDs::update(/var/lib/smokeping/isti/istiservs/pop.rrd --template
uptime:loss:median:ping1:ping2:ping3:ping4:ping5:ping6:ping7:ping8:ping9:ping10:ping11:ping12:ping13:ping14:ping15:ping16:ping17:ping18:ping19:ping20
1258370021:U:20:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U)
Nov 16 12:13:41 ala smokeping[17131]: TCPPing: Sleeping 278 seconds.
Nov 16 12:13:54 ala smokeping[17130]: EchoPingSmtp: smtp.isti.cnr.it: got
0.007752 0.014652 0.015090 0.015765 0.016198 0.016236 0.016388 0.016472
0.017036 0.017708 0.018163 0.019165 0.019520 0.019719 0.019989 0.020249
0.021385 0.024693 0.025795 0.039644
Nov 16 12:13:54 ala smokeping[17130]: Calling
RRDs::update(/var/lib/smokeping/isti/istiservs/smtp.rrd --template
uptime:loss:median:ping1:ping2:ping3:ping4:ping5:ping6:ping7:ping8:ping9:ping10:ping11:ping12:ping13:ping14:ping15:ping16:ping17:ping18:ping19:ping20
1258370034:U:0:0.018163:0.007752:0.014652:0.015090:0.015765:0.016198:0.016236:0.016388:0.016472:0.017036:0.017708:0.018163:0.019165:0.019520:0.019719:0.019989:0.020249:0.021385:0.024693:0.025795:0.039644)
============================================================
Note that the response from tcpping is coded as
1258370021:U:20:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U
while the response from echopingsmtp is coded as
1258370034:U:0:0.018163:0.007752:0.014652:0.015090:0.015765:0.016198:0.016236:0.016388:0.016472:0.017036:0.017708:0.018163:0.019165:0.019520:0.019719:0.019989:0.020249:0.021385:0.024693:0.025795:0.039644
This is what I get when executiong tcpping on the command line:
ala:~# /usr/local/bin/tcpping -C -x 20 pop.isti.cnr.it 110
pop.isti.cnr.it : - - - - - - - - - - - - - - - - - - - -
Where the hyphens are printed at 1-second intervals.
And here is the output from smokeping at startup whan called with
--debug-daemon:
===File /r...@ala:/tmp/b====================================
### Compiling alert detector pattern 'startloss'
### ==S,>0%,>0%,>0%
sub {
my $d = shift;
my $y = $d->{loss};
for(1){
my $minlength = 4;
my $maxlength = 4;
next if scalar @$y < $minlength ;
next unless defined $y->[-4] and $y->[-4] eq 'S';
next unless defined $y->[-3]
and $y->[-3] =~ /^\d/
and $y->[-3] > 0;
next unless defined $y->[-2]
and $y->[-2] =~ /^\d/
and $y->[-2] > 0;
next unless defined $y->[-1]
and $y->[-1] =~ /^\d/
and $y->[-1] > 0;
return 1;
}
return 0;
}
### Compiling alert detector pattern 'rttdetect'
### <10,<10,<10,<10,<10,<100,>100,>100,>100
sub {
my $d = shift;
my $y = $d->{rtt};
for(1){
my $minlength = 9;
my $maxlength = 9;
next if scalar @$y < $minlength ;
next unless defined $y->[-9]
and $y->[-9] =~ /^\d/
and $y->[-9] < 0.01;
next unless defined $y->[-8]
and $y->[-8] =~ /^\d/
and $y->[-8] < 0.01;
next unless defined $y->[-7]
and $y->[-7] =~ /^\d/
and $y->[-7] < 0.01;
next unless defined $y->[-6]
and $y->[-6] =~ /^\d/
and $y->[-6] < 0.01;
next unless defined $y->[-5]
and $y->[-5] =~ /^\d/
and $y->[-5] < 0.01;
next unless defined $y->[-4]
and $y->[-4] =~ /^\d/
and $y->[-4] < 0.1;
next unless defined $y->[-3]
and $y->[-3] =~ /^\d/
and $y->[-3] > 0.1;
next unless defined $y->[-2]
and $y->[-2] =~ /^\d/
and $y->[-2] > 0.1;
next unless defined $y->[-1]
and $y->[-1] =~ /^\d/
and $y->[-1] > 0.1;
return 1;
}
return 0;
}
### Compiling alert detector pattern 'bigloss'
### ==0%,==0%,==0%,==0%,>0%,>0%,>0%
sub {
my $d = shift;
my $y = $d->{loss};
for(1){
my $minlength = 7;
my $maxlength = 7;
next if scalar @$y < $minlength ;
next unless defined $y->[-7]
and $y->[-7] =~ /^\d/
and $y->[-7] == 0;
next unless defined $y->[-6]
and $y->[-6] =~ /^\d/
and $y->[-6] == 0;
next unless defined $y->[-5]
and $y->[-5] =~ /^\d/
and $y->[-5] == 0;
next unless defined $y->[-4]
and $y->[-4] =~ /^\d/
and $y->[-4] == 0;
next unless defined $y->[-3]
and $y->[-3] =~ /^\d/
and $y->[-3] > 0;
next unless defined $y->[-2]
and $y->[-2] =~ /^\d/
and $y->[-2] > 0;
next unless defined $y->[-1]
and $y->[-1] =~ /^\d/
and $y->[-1] > 0;
return 1;
}
return 0;
}
### Compiling alert detector pattern 'someloss'
### >0%,*12*,>0%,*12*,>0%
sub {
my $d = shift;
my $y = $d->{loss};
for(1){
my $imax2 = min(@$y - 3, 12);
my $imax1 = min(@$y - 3, 12);
my $minlength = 3;
my $maxlength = 27;
next if scalar @$y < $minlength ;
my $i1;
for($i1=0; $i1 < min($maxlength,$imax1); $i1++){
my $i2;
for($i2=0; $i2 < min($maxlength-$i1,$imax2); $i2++){
next unless defined $y->[-3-$i1-$i2]
and $y->[-3-$i1-$i2] =~ /^\d/
and $y->[-3-$i1-$i2] > 0;
last;
}
return 0 if $i2 >= min($maxlength-$i1-$i2,$imax2);
next unless defined $y->[-2-$i1]
and $y->[-2-$i1] =~ /^\d/
and $y->[-2-$i1] > 0;
last;
}
return 0 if $i1 >= min($maxlength-$i1,$imax1);
next unless defined $y->[-1]
and $y->[-1] =~ /^\d/
and $y->[-1] > 0;
return 1;
}
return 0;
}
============================================================
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]