Commit 194203a8 authored by Mike Hibler's avatar Mike Hibler
Browse files

Teach it how to summarize for multiple nodes

parent f51cd81e
......@@ -146,11 +146,6 @@ if (!$list && !$summary) {
$list = 1;
}
if ($showall && $summary) {
print STDERR "Cannot summarize for all nodes (yet)\n";
exit(1) if (!$list);
}
#
# Common case: a single node.
# Just fetch data for it, otherwise fetch data for all.
......@@ -302,12 +297,14 @@ for my $rec (@records) {
}
}
print scalar(@records) . " records\n"
if ($list && $verbose);
#
# Print out summary information
# We can do this for all nodes, but how do we present it?
#
my $node = $nodes[0]; # XXX
if ($summary && defined($nodestats{$node})) {
for $node (sort keys(%nodestats)) {
if ($summary && defined($nodestats{$node})) {
my ($ftime, $atime, $rtime, $dtime) = @{$nodestats{$node}};
my $ttime = $ftime + $atime + $rtime + $dtime;
......@@ -333,6 +330,7 @@ if ($summary && defined($nodestats{$node})) {
} else {
print "$node SUM $atime $ftime $rtime $dtime\n";
}
}
}
exit(0);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment