From bd9a436247d994ae617179624ff805a329efc8c7 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Mon, 22 Nov 2004 01:58:07 +0000 Subject: [PATCH] fillin cpu.wait --- src/os/linux/linux_sigar.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/os/linux/linux_sigar.c b/src/os/linux/linux_sigar.c index 72415984..8c6f2631 100644 --- a/src/os/linux/linux_sigar.c +++ b/src/os/linux/linux_sigar.c @@ -292,7 +292,10 @@ static void get_cpu_metrics(sigar_cpu_t *cpu, char *line) cpu->nice += sigar_strtoul(ptr); cpu->sys += sigar_strtoul(ptr); cpu->idle += sigar_strtoul(ptr); - cpu->wait = 0; /*XXX*/ + if (*ptr == ' ') { + /* 2.6+ kernels only */ + cpu->wait += sigar_strtoul(ptr); + } cpu->total += cpu->user + cpu->nice + cpu->sys + cpu->idle + cpu->wait; }