From: Matthias Bolte Date: Sat, 14 Nov 2009 21:52:27 +0000 (+0100) Subject: esx: Fix CPU clock Hz to MHz conversion X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=d42cfb4ef0719a99c1de84ed38af47bc7e3bffc1;p=libvirt.git esx: Fix CPU clock Hz to MHz conversion --- diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index b84250cfe5..5737fe9660 100644 --- a/src/esx/esx_driver.c +++ b/src/esx/esx_driver.c @@ -878,7 +878,7 @@ esxNodeGetInfo(virConnectPtr conn, virNodeInfoPtr nodeinfo) nodeinfo->memory = memorySize / 1024; /* Scale from bytes to kilobytes */ nodeinfo->cpus = cpuInfo_numCpuCores; - nodeinfo->mhz = cpuInfo_hz / (1024 * 1024); /* Scale from hz to mhz */ + nodeinfo->mhz = cpuInfo_hz / (1000 * 1000); /* Scale from hz to mhz */ nodeinfo->nodes = numaInfo_numNodes; nodeinfo->sockets = cpuInfo_numCpuPackages; nodeinfo->cores = cpuInfo_numCpuPackages > 0