Advertisement
Guest User

Untitled

a guest
Mar 4th, 2014
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. [03:37 PM]superuser@pipeline[/opt/smokeping/bin] > sudo time /opt/smokeping/bin/smokeping --config=/opt/smokeping/etc/config --logfile=/var/log/smoke.log --debug
  2. ### Compiling alert detector pattern 'someloss'
  3. ### >0%,*12*,>0%,*12*,>0%
  4. sub {
  5. my $d = shift;
  6. my $y = $d->{loss};
  7. for(1){
  8. my $imax2 = min(@$y - 3, 12);
  9. my $imax1 = min(@$y - 3, 12);
  10. my $minlength = 3;
  11. my $maxlength = 27;
  12. next if scalar @$y < $minlength ;
  13. my $i1;
  14. for($i1=0; $i1 < min($maxlength,$imax1); $i1++){
  15. my $i2;
  16. for($i2=0; $i2 < min($maxlength-$i1,$imax2); $i2++){
  17. next unless defined $y->[-3-$i1-$i2]
  18. and $y->[-3-$i1-$i2] =~ /^\d/
  19. and $y->[-3-$i1-$i2] > 0
  20. ; last;
  21. }
  22. return 0 if $i2 >= min($maxlength-$i1-$i2,$imax2);
  23. next unless defined $y->[-2-$i1]
  24. and $y->[-2-$i1] =~ /^\d/
  25. and $y->[-2-$i1] > 0
  26. ; last;
  27. }
  28. return 0 if $i1 >= min($maxlength-$i1,$imax1);
  29. next unless defined $y->[-1]
  30. and $y->[-1] =~ /^\d/
  31. and $y->[-1] > 0
  32. ; return 1;
  33. }
  34. return 0;
  35. }
  36.  
  37.  
  38.  
  39. 0.29user 0.07system 1:39.77elapsed 0%CPU (0avgtext+0avgdata 100064maxresident)k
  40. 0inputs+664outputs (0major+10322minor)pagefaults 0swaps
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement