only print cpuinfo once, it'll be the same for each
This commit is contained in:
parent
4682ff2eab
commit
186ec234fc
|
@ -30,9 +30,7 @@ public class CpuInfo extends SigarCommandBase {
|
||||||
CpuPerc[] cpus = null;
|
CpuPerc[] cpus = null;
|
||||||
|
|
||||||
println(infos.length + " total CPUs..");
|
println(infos.length + " total CPUs..");
|
||||||
|
net.hyperic.sigar.CpuInfo info = infos[0];
|
||||||
for (int i=0; i<infos.length; i++) {
|
|
||||||
net.hyperic.sigar.CpuInfo info = infos[i];
|
|
||||||
long cacheSize = info.getCacheSize();
|
long cacheSize = info.getCacheSize();
|
||||||
println("Vendor........" + info.getVendor());
|
println("Vendor........" + info.getVendor());
|
||||||
println("Model........." + info.getModel());
|
println("Model........." + info.getModel());
|
||||||
|
@ -40,9 +38,12 @@ public class CpuInfo extends SigarCommandBase {
|
||||||
if (cacheSize != Sigar.FIELD_NOTIMPL) {
|
if (cacheSize != Sigar.FIELD_NOTIMPL) {
|
||||||
println("Cache size...." + cacheSize);
|
println("Cache size...." + cacheSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.displayTimes) {
|
if (!this.displayTimes) {
|
||||||
continue;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (int i=0; i<infos.length; i++) {
|
||||||
if (cpus == null) {
|
if (cpus == null) {
|
||||||
cpus = this.sigar.getCpuPercList();
|
cpus = this.sigar.getCpuPercList();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue