output cores per if > total

This commit is contained in:
Doug MacEachern 2008-04-11 18:10:18 +00:00
parent d895adc73e
commit 00084a7219
1 changed files with 3 additions and 1 deletions

View File

@ -64,7 +64,9 @@ public class CpuInfo extends SigarCommandBase {
println("Model.........." + info.getModel());
println("Mhz............" + info.getMhz());
println("Total CPUs....." + info.getTotalCores());
if (info.getTotalCores() != info.getTotalSockets()) {
if ((info.getTotalCores() != info.getTotalSockets()) ||
(info.getCoresPerSocket() > info.getTotalCores()))
{
println("Physical CPUs.." + info.getTotalSockets());
println("Cores per CPU.." + info.getCoresPerSocket());
}