[smokeping-users] smokeping hanging on startup

Robert Smith lists at wansecurity.com
Thu Feb 15 10:47:02 CET 2007


I've been using smokeping for years, and never had this problem before.
I have the etc/config logging to syslog local0.

local0.*                        /var/log/smokeping.log


But nothing shows up in the logs.


I've tried running...

smokeping at capacity:~$ perl bin/smokeping --debug-daemon
### fping seems to report in 1 milliseconds
### assuming you are using an fping copy reporting in milliseconds

but no extra logging and still hangs just like so.

Wow, i just let it sit for a long time and got this:

smokeping at capacity:~$ perl bin/smokeping --debug-daemon
### fping seems to report in 1 milliseconds
### assuming you are using an fping copy reporting in milliseconds
### assuming you are using an fping copy reporting in milliseconds
### 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;
}



Note: logging to syslog as local0/info.
Daemonizing bin/smokeping ...
smokeping at capacity:~$


can anyone shed some light on the subject?

Cheers,

-Robert



More information about the smokeping-users mailing list