From 556c3e593d7d8cad62a9c615f063ff9d877270c2 Mon Sep 17 00:00:00 2001 From: Jordi Sanfeliu Date: Thu, 7 Jan 2021 10:59:37 +0100 Subject: [PATCH] Fixed de scalar of Data Segments (DS) on the textmode interface in modules: - apache.pm - chrony.pm - nut.pm - pagespeed.pm - tinyproxy.pm --- lib/apache.pm | 6 +++--- lib/chrony.pm | 6 +++--- lib/nut.pm | 6 +++--- lib/pagespeed.pm | 6 +++--- lib/tinyproxy.pm | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/apache.pm b/lib/apache.pm index d11b1a3..0544531 100644 --- a/lib/apache.pm +++ b/lib/apache.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2020 by Jordi Sanfeliu +# Copyright (C) 2005-2021 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -804,8 +804,8 @@ sub apache_cgi { push(@output, sprintf(" %2d$tf->{tc}", $time)); for($n2 = 0; $n2 < scalar(my @al = split(',', $apache->{list})); $n2++) { undef(@row); - $from = $n2 * 5; - $to = $from + 5; + $from = $n2 * 21; + $to = $from + 21; push(@row, @$line[$from..$to]); push(@output, sprintf(" %7d %9d %4.2f%% %3d %3d", @row)); } diff --git a/lib/chrony.pm b/lib/chrony.pm index 51d558b..4178f86 100644 --- a/lib/chrony.pm +++ b/lib/chrony.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2020 by Jordi Sanfeliu +# Copyright (C) 2005-2021 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -306,8 +306,8 @@ sub chrony_cgi { push(@output, sprintf(" %2d$tf->{tc}", $time)); for($n2 = 0; $n2 < scalar(my @pl = split(',', $chrony->{list})); $n2++) { undef(@row); - $from = $n2 * 22; - $to = $from + 22; + $from = $n2 * 14; + $to = $from + 14; my ($stratum, $loffset, $rmsoffs, $freq, $rfreq, $skew, $rootdel, $rootdis, $upintvl) = @$line[$from..$to]; push(@output, sprintf(" % 9.8f %9.8f %8.6f %8.6f %2.0f %6.3f %5.3f %7.1f", $loffset || 0, $rmsoffs || 0, $rootdel || 0, $rootdis || 0, $stratum || 0, $freq || 0, $skew || 0, $upintvl || 0)); } diff --git a/lib/nut.pm b/lib/nut.pm index 7a4b699..a224578 100644 --- a/lib/nut.pm +++ b/lib/nut.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2020 by Jordi Sanfeliu +# Copyright (C) 2005-2021 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -338,8 +338,8 @@ sub nut_cgi { push(@output, sprintf(" %2d$tf->{tc}", $time)); for($n2 = 0; $n2 < scalar(my @pl = split(',', $nut->{list})); $n2++) { undef(@row); - $from = $n2 * 22; - $to = $from + 22; + $from = $n2 * 21; + $to = $from + 21; my ($ltran, $htran, $ivolt, $ovolt, $bchar, $loadc, $mbatc, undef, $atemp, $itemp, $humid, $battv, $nomba, $timel, $minti, $linef) = @$line[$from..$to]; $itemp = celsius_to($config, $itemp); $atemp = celsius_to($config, $atemp); diff --git a/lib/pagespeed.pm b/lib/pagespeed.pm index 6ff5f33..2d27fe7 100644 --- a/lib/pagespeed.pm +++ b/lib/pagespeed.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2020 by Jordi Sanfeliu +# Copyright (C) 2005-2021 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -733,8 +733,8 @@ sub pagespeed_cgi { $from = 1; push(@output, sprintf(" %2d$tf->{tc} ", $time)); for($n2 = 0; $n2 < scalar(my @pl = split(',', $pagespeed->{list})); $n2++) { - $from += $n2 * 52; - $to = $from + 52; + $from += $n2 * 59; + $to = $from + 59; @row = @$line[$from..$to]; push(@output, sprintf(" %6d %6d %6d %6d %6d %6d %6d %6d %6d %6d %6d %6d %6d %6d %6d %6d %6d %6d %6d %6d %6d %6d %6d %6d %6d %6d %6d %6d %6d %6d %6d %6d %6d %10d %10d %10d %10d %10d %10d %9d %9d", @row)); } diff --git a/lib/tinyproxy.pm b/lib/tinyproxy.pm index e7cee93..9873b85 100644 --- a/lib/tinyproxy.pm +++ b/lib/tinyproxy.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2020 by Jordi Sanfeliu +# Copyright (C) 2005-2021 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -324,8 +324,8 @@ sub tinyproxy_cgi { push(@output, sprintf(" %2d$tf->{tc}", $time)); for($n2 = 0; $n2 < scalar(my @tl = split(',', $tinyproxy->{list})); $n2++) { undef(@row); - $from = $n2 * 14; - $to = $from + 14; + $from = $n2 * 10; + $to = $from + 10; my ($ocon, $reqs, $bcon, $dcon, $rcon) = @$line[$from..$to]; push(@output, sprintf(" %6.1f %6.1f %6.1f %6.1f %6.1f", $ocon || 0, $reqs || 0, $bcon || 0, $dcon || 0, $rcon || 0)); }