skip Totals if there is only 1 cpu

This commit is contained in:
Doug MacEachern 2006-01-02 17:07:54 +00:00
parent 8e8cd18e16
commit ee0f0c774a
1 changed files with 4 additions and 2 deletions

View File

@ -62,9 +62,11 @@ public class CpuInfo extends SigarCommandBase {
output(cpus[i]); output(cpus[i]);
} }
if (infos.length > 1) {
println("Totals........"); println("Totals........");
output(this.sigar.getCpuPerc()); output(this.sigar.getCpuPerc());
} }
}
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
new CpuInfo().processCommand(args); new CpuInfo().processCommand(args);