From 00084a72197cf48493679e5682e7c048cb04e10e Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Fri, 11 Apr 2008 18:10:18 +0000 Subject: [PATCH] output cores per if > total --- bindings/java/src/org/hyperic/sigar/cmd/CpuInfo.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bindings/java/src/org/hyperic/sigar/cmd/CpuInfo.java b/bindings/java/src/org/hyperic/sigar/cmd/CpuInfo.java index 901a006b..8e71fed6 100644 --- a/bindings/java/src/org/hyperic/sigar/cmd/CpuInfo.java +++ b/bindings/java/src/org/hyperic/sigar/cmd/CpuInfo.java @@ -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()); }