aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenstat
diff options
context:
space:
mode:
authorKeir Fraser <keir@xensource.com>2007-10-19 18:00:10 +0100
committerKeir Fraser <keir@xensource.com>2007-10-19 18:00:10 +0100
commit07f557cb63359808a29d14b2359f5c9c3e2c4973 (patch)
tree80354b497066ccea8b09834658d49d9a76ff7fed /tools/xenstat
parentf475a034a7560a64416f9fde0f035b74ef3ac2ea (diff)
downloadxen-07f557cb63359808a29d14b2359f5c9c3e2c4973.tar.gz
xen-07f557cb63359808a29d14b2359f5c9c3e2c4973.tar.bz2
xen-07f557cb63359808a29d14b2359f5c9c3e2c4973.zip
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 <eak@us.ibm.com> Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'tools/xenstat')
-rw-r--r--tools/xenstat/libxenstat/src/xenstat.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/xenstat/libxenstat/src/xenstat.c b/tools/xenstat/libxenstat/src/xenstat.c
index 461806ec7d..559fb9bec6 100644
--- a/tools/xenstat/libxenstat/src/xenstat.c
+++ b/tools/xenstat/libxenstat/src/xenstat.c
@@ -155,9 +155,7 @@ xenstat_node *xenstat_get_node(xenstat_handle * handle, unsigned int flags)
}
node->cpu_hz = ((unsigned long long)physinfo.cpu_khz) * 1000ULL;
- node->num_cpus =
- (physinfo.threads_per_core * physinfo.cores_per_socket *
- physinfo.sockets_per_node * physinfo.nr_nodes);
+ node->num_cpus = physinfo.nr_cpus;
node->tot_mem = ((unsigned long long)physinfo.total_pages)
* handle->page_size;
node->free_mem = ((unsigned long long)physinfo.free_pages)