Add 0 before . for httpd stats

This commit is contained in:
Daniel Berteaud 2016-11-09 17:41:55 +01:00
parent ab8ce667b4
commit 593da4265e

View File

@ -28,7 +28,10 @@ foreach my $line (split(/\n/, $status)){
my ($key, $val) = split(/:/, $line);
$key =~ s/\s/_/g;
$key = lc $key;
# Remove leading and trailing spaces
$val =~ s/^\s+|\s+$//g;
# Add 0 before the . when needed
$val =~ s/^(\.\d+)$/0$1/;
$res{$key} = $val;
}