summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4fd7396)
raw | patch | inline | side by side (parent: 4fd7396)
author | Herve COMMOWICK <herve.commowick@adobe.com> | |
Thu, 8 Oct 2015 09:41:45 +0000 (11:41 +0200) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Wed, 14 Oct 2015 06:51:49 +0000 (08:51 +0200) |
because actually we count threads instead of processes
src/processes.c | patch | blob | history |
diff --git a/src/processes.c b/src/processes.c
index fde96f89d245c3b79d3a6c5a5239f1d76052cae0..bac61c09e3867bb2ff59fc142b2208f314549e21 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);
pse.cswitch_invol = -1;
ps_list_add (procs[i].p_comm, have_cmdline ? cmdline : NULL, &pse);
- } /* if ((proc_ptr == NULL) || (proc_ptr->p_pid != procs[i].p_pid)) */
- switch (procs[i].p_stat)
- {
- case SSTOP: stopped++; break;
- case SSLEEP: sleeping++; break;
- case SRUN: running++; break;
- case SIDL: idle++; break;
- case SONPROC: onproc++; break;
- case SDEAD: dead++; break;
- case SZOMB: zombies++; break;
- }
+ switch (procs[i].p_stat)
+ {
+ case SSTOP: stopped++; break;
+ case SSLEEP: sleeping++; break;
+ case SRUN: running++; break;
+ case SIDL: idle++; break;
+ case SONPROC: onproc++; break;
+ case SDEAD: dead++; break;
+ case SZOMB: zombies++; break;
+ }
+ } /* if ((proc_ptr == NULL) || (proc_ptr->p_pid != procs[i].p_pid)) */
}
kvm_close(kd);