X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fhfstats.pl;h=547882d1490fa84c995774c47a1645b15c6dca0c;hb=5b9ab81174d4a7734c92af52da6ddf89e980e321;hp=63a3b56c1eaa0532f92d7f7db3dfecbcdd5bc297;hpb=f526fba8b99f487581a3048d4c0f2cd2d3c1d7c9;p=spider.git diff --git a/cmd/show/hfstats.pl b/cmd/show/hfstats.pl index 63a3b56c..547882d1 100644 --- a/cmd/show/hfstats.pl +++ b/cmd/show/hfstats.pl @@ -35,17 +35,19 @@ for ($i = 0; $i < $days; $i++) { my @out; my @tot; -push @out, $self->msg('stathf'); -push @out, sprintf "%11s|%6s|%5s|%5s|%5s|%5s|%5s|%5s|%5s|%5s|%5s|", qw(Date Total 160m 80m 40m 30m 20m 17m 15m 12m 10m); +push @out, $self->msg('stathf', cldate(time)); +push @out, sprintf "%6s|%6s|%5s|%5s|%5s|%5s|%5s|%5s|%5s|%5s|%5s|%5s|", qw(Date Total 160m 80m 60m 40m 30m 20m 17m 15m 12m 10m); foreach my $ref (@in) { my $linetot = 0; - foreach my $j (3..11) { + foreach my $j (4..13) { $tot[$j] += $ref->[$j]; $tot[0] += $ref->[$j]; $linetot += $ref->[$j]; } - push @out, join '|', sprintf("%11s|%6d", $ref->[0]->as_string, $linetot), map {$_ ? sprintf("%5d", $_) : ' '} @$ref[3..11], ""; + my $date = $ref->[0]->as_string; + $date =~ s/-\d+$//; + push @out, join '|', sprintf("%6s|%6d", $date, $linetot), map {$_ ? sprintf("%5d", $_) : ' '} @$ref[4..13], ""; } -push @out, join '|', sprintf("%11s|%6d", 'Total', $tot[0]), map {$_ ? sprintf("%5d", $_) : ' '} @tot[3..11], ""; +push @out, join '|', sprintf("%6s|%6d", 'Total', $tot[0]), map {$_ ? sprintf("%5d", $_) : ' '} @tot[4..13], ""; return (1, @out);