fix cpu_info cores+sockets

This commit is contained in:
Doug MacEachern 2008-04-09 07:18:38 +00:00
parent cb002c8541
commit 552f0ede26
1 changed files with 2 additions and 2 deletions

View File

@ -350,8 +350,8 @@ int sigar_cpu_info_get(sigar_t *sigar, sigar_cpu_info_t *info)
info->mhz = -1;
}
info->total_cores = sigar->ncpu;
info->total_sockets = sigar->ncpu / sigar->lcpu;
info->total_cores = sigar->ncpu * sigar->lcpu;
info->total_sockets = sigar->ncpu;
info->cache_size = -1; //XXX
RegCloseKey(key);