windows cpu_info cores+sockets

This commit is contained in:
Doug MacEachern 2008-04-09 07:08:03 +00:00
parent 2b9c8971e0
commit cb002c8541
1 changed files with 4 additions and 1 deletions

View File

@ -283,7 +283,7 @@ unsigned int sigar_cpu_count(sigar_t *sigar)
} }
else { else {
sigar->ht_enabled = 0; sigar->ht_enabled = 0;
sigar->lcpu = 0; sigar->lcpu = 1;
} }
return sigar->ncpu; return sigar->ncpu;
@ -350,6 +350,9 @@ int sigar_cpu_info_get(sigar_t *sigar, sigar_cpu_info_t *info)
info->mhz = -1; info->mhz = -1;
} }
info->total_cores = sigar->ncpu;
info->total_sockets = sigar->ncpu / sigar->lcpu;
info->cache_size = -1; //XXX info->cache_size = -1; //XXX
RegCloseKey(key); RegCloseKey(key);
RegCloseKey(cpu); RegCloseKey(cpu);