[SIGAR-14] Fix sigar_cpu_t.total on Linux and Solaris with multi-core CPUs

This commit is contained in:
Doug MacEachern committed 2006-09-07 14:10:24 +00:00
1 parent d8159a6024
commit 9d7275a29b
3 files changed
+7 -3

No files matched your search

+1 -1
View File
@@ -431,7 +431,7 @@ static void get_cpu_metrics(sigar_t *sigar, sigar_cpu_t *cpu, char *line)
/* 2.6+ kernels only */
cpu->wait += SIGAR_TICK2SEC(sigar_strtoul(ptr));
}
cpu->total += cpu->user + cpu->nice + cpu->sys + cpu->idle + cpu->wait;
cpu->total = cpu->user + cpu->nice + cpu->sys + cpu->idle + cpu->wait;
}
int sigar_cpu_get(sigar_t *sigar, sigar_cpu_t *cpu)