skip Totals if there is only 1 cpu
This commit is contained in:
parent
8e8cd18e16
commit
ee0f0c774a
|
@ -62,8 +62,10 @@ public class CpuInfo extends SigarCommandBase {
|
|||
output(cpus[i]);
|
||||
}
|
||||
|
||||
println("Totals........");
|
||||
output(this.sigar.getCpuPerc());
|
||||
if (infos.length > 1) {
|
||||
println("Totals........");
|
||||
output(this.sigar.getCpuPerc());
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
|
Loading…
Reference in New Issue