mirror of https://github.com/mikaku/Monitorix.git
Fixed de scalar of Data Segments (DS) on the textmode interface in modules:
- apache.pm - chrony.pm - nut.pm - pagespeed.pm - tinyproxy.pm
This commit is contained in:
parent
85a0360d45
commit
556c3e593d
|
@ -1,7 +1,7 @@
|
|||
#
|
||||
# Monitorix - A lightweight system monitoring tool.
|
||||
#
|
||||
# Copyright (C) 2005-2020 by Jordi Sanfeliu <jordi@fibranet.cat>
|
||||
# Copyright (C) 2005-2021 by Jordi Sanfeliu <jordi@fibranet.cat>
|
||||
#
|
||||
# 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));
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#
|
||||
# Monitorix - A lightweight system monitoring tool.
|
||||
#
|
||||
# Copyright (C) 2005-2020 by Jordi Sanfeliu <jordi@fibranet.cat>
|
||||
# Copyright (C) 2005-2021 by Jordi Sanfeliu <jordi@fibranet.cat>
|
||||
#
|
||||
# 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));
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#
|
||||
# Monitorix - A lightweight system monitoring tool.
|
||||
#
|
||||
# Copyright (C) 2005-2020 by Jordi Sanfeliu <jordi@fibranet.cat>
|
||||
# Copyright (C) 2005-2021 by Jordi Sanfeliu <jordi@fibranet.cat>
|
||||
#
|
||||
# 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);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#
|
||||
# Monitorix - A lightweight system monitoring tool.
|
||||
#
|
||||
# Copyright (C) 2005-2020 by Jordi Sanfeliu <jordi@fibranet.cat>
|
||||
# Copyright (C) 2005-2021 by Jordi Sanfeliu <jordi@fibranet.cat>
|
||||
#
|
||||
# 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));
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#
|
||||
# Monitorix - A lightweight system monitoring tool.
|
||||
#
|
||||
# Copyright (C) 2005-2020 by Jordi Sanfeliu <jordi@fibranet.cat>
|
||||
# Copyright (C) 2005-2021 by Jordi Sanfeliu <jordi@fibranet.cat>
|
||||
#
|
||||
# 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));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue