From 07f557cb63359808a29d14b2359f5c9c3e2c4973 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 19 Oct 2007 18:00:10 +0100 Subject: Replace sysctl.physinfo.sockets_per_node with more directly useful sysctl.physinfo.nr_cpus. This also avoids miscalculation of sockets_per_node by Xen where the number of CPUs in the system is clipped. From: Elizabeth Kon Signed-off-by: Keir Fraser --- tools/xm-test/lib/XmTestLib/Xm.py | 6 ++---- tools/xm-test/lib/XmTestReport/OSReport.py | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'tools/xm-test') diff --git a/tools/xm-test/lib/XmTestLib/Xm.py b/tools/xm-test/lib/XmTestLib/Xm.py index 6f1e33c153..6eeab7bb9d 100644 --- a/tools/xm-test/lib/XmTestLib/Xm.py +++ b/tools/xm-test/lib/XmTestLib/Xm.py @@ -218,11 +218,9 @@ def restartXend(): return status def smpConcurrencyLevel(): - cores = int(getInfo("cores_per_socket")) - threads = int(getInfo("threads_per_core")) - sockets = int(getInfo("sockets_per_node")) + nr_cpus = int(getInfo("nr_cpus")) - return cores * sockets * threads + return nr_cpus if __name__ == "__main__": if isDomainRunning("0"): diff --git a/tools/xm-test/lib/XmTestReport/OSReport.py b/tools/xm-test/lib/XmTestReport/OSReport.py index 80bb4bed53..4eaa20cae9 100644 --- a/tools/xm-test/lib/XmTestReport/OSReport.py +++ b/tools/xm-test/lib/XmTestReport/OSReport.py @@ -92,7 +92,6 @@ class Machine: xenValues = {"nr_cpus" : "Unknown", "nr_nodes" : "Unknown", - "sockets_per_node" : "Unknown", "cores_per_socket" : "Unknown", "threads_per_core" : "Unknown", "cpu_mhz" : "Unknown", -- cgit v1.2.3