fixed to limit the length of the device names in 'fs.pm'

This commit is contained in:
Jordi Sanfeliu 2017-12-01 11:51:58 +01:00
parent f1f0934be9
commit 7a13778d7f
2 changed files with 6 additions and 5 deletions

View File

@ -13,6 +13,7 @@
graphs generation if 'show_gaps' option was enabled.
- Fixed to correctly represent the values in text mode in 'ipmi.pm'.
- Fixed a missalignment of the MB & CPU temperatures values in 'lmsens.pm'.
- Fixed to limit the length of the device names in 'fs.pm'.
3.10.0 - 25-Sep-2017

View File

@ -980,7 +980,7 @@ sub fs_cgi {
$color = $LC[$n2++];
}
push(@tmpz, "LINE2:fs" . $n . $color . ":$str");
$str = sprintf("%-23s", $str);
$str = sprintf("%-23s", substr($str, 0, 23));
push(@tmp, "LINE2:fs" . $n . $color . ":$str");
push(@tmp, "GPRINT:fs" . $n . ":LAST:Cur\\: %4.1lf%%");
push(@tmp, "GPRINT:fs" . $n . ":MIN: Min\\: %4.1lf%%");
@ -1097,7 +1097,7 @@ sub fs_cgi {
$color = $LC[$n2++];
}
push(@tmpz, "LINE2:ioa" . $n . $color . ":$str");
$str = sprintf("%-23s", $str);
$str = sprintf("%-23s", substr($str, 0, 23));
push(@tmp, "LINE2:ioa" . $n . $color . ":$str");
push(@tmp, "GPRINT:ioa" . $n . ":LAST:Cur\\: %4.0lf");
push(@tmp, "GPRINT:ioa" . $n . ":MIN: Min\\: %4.0lf");
@ -1209,7 +1209,7 @@ sub fs_cgi {
$color = $LC[$n2++];
}
push(@tmpz, "LINE2:fs" . $n . $color . ":$str");
$str = sprintf("%-23s", $str);
$str = sprintf("%-23s", substr($str, 0, 23));
push(@tmp, "LINE2:fs" . $n . $color . ":$str");
push(@tmp, "GPRINT:fs" . $n . ":LAST:Cur\\: %4.1lf%%");
push(@tmp, "GPRINT:fs" . $n . ":MIN: Min\\: %4.1lf%%");
@ -1334,7 +1334,7 @@ sub fs_cgi {
$color = $LC[$n2++];
}
push(@tmpz, "LINE2:tim" . $n . $color . ":$str");
$str = sprintf("%-23s", $str);
$str = sprintf("%-23s", substr($str, 0, 23));
push(@tmp, "LINE2:tim" . $n . $color . ":$str");
push(@tmp, "GPRINT:stim" . $n . ":LAST:Cur\\: %4.1lfs");
push(@tmp, "GPRINT:stim" . $n . ":MIN:Min\\: %4.1lfs");
@ -1360,7 +1360,7 @@ sub fs_cgi {
$color = $LC[$n2++];
}
push(@tmpz, "LINE2:tim" . $n . $color . ":$str");
$str = sprintf("%-23s", $str);
$str = sprintf("%-23s", substr($str, 0, 23));
push(@tmp, "LINE2:tim" . $n . $color . ":$str");
push(@tmp, "GPRINT:tim" . $n . ":LAST:Cur\\: %4.0lf");
push(@tmp, "GPRINT:tim" . $n . ":MIN: Min\\: %4.0lf");