Inneport and some cosmetic bug in INN 2.5.1

Petr Novopashenniy pety at rusnet.ru
Fri Oct 30 09:12:54 UTC 2009


Good day, Julien!

On Thu, 29 Oct 2009, Julien ?LIE wrote:

JL> 
JL> I think the problem comes from the "$hostname:$channel" split.
JL> Could you please try that patch:
JL> 
JL> --- innreport_inn.pm    (r?vision 8665)
JL> +++ innreport_inn.pm    (copie de travail)
JL> @@ -2185,17 +2185,18 @@
JL> 
JL>     # Sum all incoming traffic for each full server.
JL>     foreach $key (keys (%innd_connect)) {
JL> -      ($hostname, $channel) = split(':', $key);
JL> -      $innd_seconds_sum{$hostname} += ($innd_seconds{$key} || 0);
JL> -      $innd_connect_sum{$hostname} += ($innd_connect{$key} || 0);
JL> -      $innd_offered_sum{$hostname} += ($innd_offered{$key} || 0);
JL> -      $innd_accepted_sum{$hostname} += ($innd_accepted{$key} || 0);
JL> -      $innd_refused_sum{$hostname} += ($innd_refused{$key} || 0);
JL> -      $innd_rejected_sum{$hostname} += ($innd_rejected{$key} || 0);
JL> -      $innd_stored_size_sum{$hostname} += ($innd_stored_size{$key} || 0);
JL> -      $innd_duplicated_size_sum{$hostname} += ($innd_duplicated_size{$key}
JL> || 0);
JL> -      $innd_offered_size_sum{$hostname} += ($innd_offered_size{$key} || 0);
JL> -      $innd_rejected_size_sum{$hostname} += ($innd_rejected_size{$key} ||
JL> 0);
JL> +      if ($key =~ /^(\S+):\d+$/) {
JL> +        $innd_seconds_sum{$1} += ($innd_seconds{$key} || 0);
JL> +        $innd_connect_sum{$1} += ($innd_connect{$key} || 0);
JL> +        $innd_offered_sum{$1} += ($innd_offered{$key} || 0);
JL> +        $innd_accepted_sum{$1} += ($innd_accepted{$key} || 0);
JL> +        $innd_refused_sum{$1} += ($innd_refused{$key} || 0);
JL> +        $innd_rejected_sum{$1} += ($innd_rejected{$key} || 0);
JL> +        $innd_stored_size_sum{$1} += ($innd_stored_size{$key} || 0);
JL> +        $innd_duplicated_size_sum{$1} += ($innd_duplicated_size{$key} ||
JL> 0);
JL> +        $innd_offered_size_sum{$1} += ($innd_offered_size{$key} || 0);
JL> +        $innd_rejected_size_sum{$1} += ($innd_rejected_size{$key} || 0);
JL> +      }
JL>     }
JL> 
JL>     # adjust min/max of innd timer stats.

It works well, thanks!


--pety



More information about the inn-workers mailing list