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/xenmon/xenbaked.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'tools/xenmon') diff --git a/tools/xenmon/xenbaked.c b/tools/xenmon/xenbaked.c index 35bc8a89e2..afca2f2168 100644 --- a/tools/xenmon/xenbaked.c +++ b/tools/xenmon/xenbaked.c @@ -460,10 +460,7 @@ unsigned int get_num_cpus(void) xc_interface_close(xc_handle); opts.cpu_freq = (double)physinfo.cpu_khz/1000.0; - return (physinfo.threads_per_core * - physinfo.cores_per_socket * - physinfo.sockets_per_node * - physinfo.nr_nodes); + return physinfo.nr_cpus; } -- cgit v1.2.3