From 6c1167c4d7c15cb7660f473abb8a831634a3ce97 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Thu, 12 May 2005 02:49:29 +0000 Subject: [PATCH] dont reconvert for cpu total --- src/os/solaris/solaris_sigar.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/os/solaris/solaris_sigar.c b/src/os/solaris/solaris_sigar.c index 858013c5..df540a54 100644 --- a/src/os/solaris/solaris_sigar.c +++ b/src/os/solaris/solaris_sigar.c @@ -323,7 +323,7 @@ int sigar_cpu_list_get(sigar_t *sigar, sigar_cpu_list_t *cpulist) kstat_ctl_t *kc = sigar->kc; kstat_t *ksp; ulong cpuinfo[CPU_STATES]; - unsigned int i, n; + unsigned int i; sigar_kstat_update(sigar); if (cpulist == &sigar->cpulist) { @@ -381,11 +381,7 @@ int sigar_cpu_list_get(sigar_t *sigar, sigar_cpu_list_t *cpulist) cpu->idle = SIGAR_TICK2SEC(cpuinfo[CPU_IDLE]); cpu->wait = SIGAR_TICK2SEC(cpuinfo[CPU_WAIT]); cpu->nice = 0; /* no cpu->nice */ - cpu->total = 0; - - for (n=0; ntotal += cpuinfo[n]; - } + cpu->total = cpu->user + cpu->sys + cpu->idle + cpu->wait; } return SIGAR_OK;