summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d164032)
raw | patch | inline | side by side (parent: d164032)
author | Herve COMMOWICK <herve.commowick@adobe.com> | |
Wed, 14 Oct 2015 06:57:05 +0000 (08:57 +0200) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Wed, 14 Oct 2015 07:10:30 +0000 (09:10 +0200) |
because actually we count threads instead of processes
(partial backport of 85c31a6d66 for collectd-5.4 /mf)
(partial backport of 85c31a6d66 for collectd-5.4 /mf)
src/processes.c | patch | blob | history |
diff --git a/src/processes.c b/src/processes.c
index e8839df429b0f117d77ab6ac710466462f8698de..516104f0f40b095860ec8cefce2c605b6caace31 100644 (file)
--- a/src/processes.c
+++ b/src/processes.c
pse.io_syscw = -1;
ps_list_add (procs[i].ki_comm, have_cmdline ? cmdline : NULL, &pse);
- } /* if ((proc_ptr == NULL) || (proc_ptr->ki_pid != procs[i].ki_pid)) */
- switch (procs[i].ki_stat)
- {
- case SSTOP: stopped++; break;
- case SSLEEP: sleeping++; break;
- case SRUN: running++; break;
- case SIDL: idle++; break;
- case SWAIT: wait++; break;
- case SLOCK: blocked++; break;
- case SZOMB: zombies++; break;
- }
+ switch (procs[i].ki_stat)
+ {
+ case SSTOP: stopped++; break;
+ case SSLEEP: sleeping++; break;
+ case SRUN: running++; break;
+ case SIDL: idle++; break;
+ case SWAIT: wait++; break;
+ case SLOCK: blocked++; break;
+ case SZOMB: zombies++; break;
+ }
+ } /* if ((proc_ptr == NULL) || (proc_ptr->ki_pid != procs[i].ki_pid)) */
}
kvm_close(kd);