1 |
klausman 12/08/29 08:26:37 |
2 |
|
3 |
Added: smokeping_fping-3.3.patch |
4 |
Log: |
5 |
Added edited ebuild from Donald R. Gray Jr (as per bug 404277). |
6 |
|
7 |
Changes: |
8 |
- Use upstream fix for fping-3.3 (files/smokeping_fping-3.3.patch) |
9 |
- Drop SSH and Radius deps since they're not strictly needed. When/if we |
10 |
include the necessary packages in the tree, we can re-add them |
11 |
- The install paths may have changed. |
12 |
|
13 |
Due to the last point and since there's a lot of sed'ing going on which pva@ |
14 |
might not eb OK with, it's not keyworded for anything right now. I'll review |
15 |
this commit with him to find out what needs to be changed. |
16 |
|
17 |
Revision Changes Path |
18 |
1.1 net-analyzer/smokeping/files/smokeping_fping-3.3.patch |
19 |
|
20 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/smokeping/files/smokeping_fping-3.3.patch?rev=1.1&view=markup |
21 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/smokeping/files/smokeping_fping-3.3.patch?rev=1.1&content-type=text/plain |
22 |
|
23 |
Index: smokeping_fping-3.3.patch |
24 |
=================================================================== |
25 |
commit 491498b57a427230069604d10b68073c0f6f5e33 |
26 |
Author: Tobias Oetiker <tobi@×××××××.ch> |
27 |
Date: Wed Aug 29 09:49:57 2012 +0200 |
28 |
|
29 |
allow to configure FPing probe to read fping output form stdout instead of stderr |
30 |
|
31 |
diff --git a/lib/Smokeping/probes/FPing.pm b/lib/Smokeping/probes/FPing.pm |
32 |
index 2b932bf..0901201 100644 |
33 |
--- a/lib/Smokeping/probes/FPing.pm |
34 |
+++ b/lib/Smokeping/probes/FPing.pm |
35 |
@@ -32,6 +32,9 @@ your system yet, you can get a slightly enhanced version from L<www.smokeping.or |
36 |
|
37 |
The (optional) B<packetsize> option lets you configure the packetsize for the pings sent. |
38 |
|
39 |
+Since version 3.3 fping sends its statistics to stdout. Set B<usestdout> to 'true' |
40 |
+so make smokeping read stdout instead of stderr. |
41 |
+ |
42 |
In B<blazemode>, FPing sends one more ping than requested, and discards |
43 |
the first RTT value returned as it's likely to be an outlier. |
44 |
|
45 |
@@ -142,7 +145,8 @@ sub ping ($){ |
46 |
$self->do_debug("Executing @cmd"); |
47 |
my $pid = open3($inh,$outh,$errh, @cmd); |
48 |
$self->{rtts}={}; |
49 |
- while (<$errh>){ |
50 |
+ my $fh = ($self->{properties}{usestdout} || '') eq 'true' ? $outh : $errh; |
51 |
+ while (<$fh>){ |
52 |
chomp; |
53 |
$self->do_debug("Got fping output: '$_'"); |
54 |
next unless /^\S+\s+:\s+[-\d\.]/; #filter out error messages from fping |
55 |
@@ -194,6 +198,12 @@ sub probevars { |
56 |
_doc => "Send an extra ping and then discarge the first answer since the first is bound to be an outliner.", |
57 |
|
58 |
}, |
59 |
+ usestdout => { |
60 |
+ _re => '(true|false)', |
61 |
+ _example => 'true', |
62 |
+ _doc => "Listen for FPing output on stdout instead of stderr ... (version 3.3+ sends its statistics on stdout).", |
63 |
+ |
64 |
+ }, |
65 |
timeout => { |
66 |
_re => '(\d*\.)?\d+', |
67 |
_example => 1.5, |