[libgtop] Exclude the "idle" kernel process when GLIBTOP_EXCLUDE_IDLE.
- From: Benoît Dejean <bdejean src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgtop] Exclude the "idle" kernel process when GLIBTOP_EXCLUDE_IDLE.
- Date: Sat, 8 Aug 2015 08:57:33 +0000 (UTC)
commit 5c6879baabeca12cfb5da711241ce6ca1b24c07f
Author: Benoit Dejean <bdejean gmail com>
Date: Wed Jul 22 23:24:13 2015 +0200
Exclude the "idle" kernel process when GLIBTOP_EXCLUDE_IDLE.
sysdeps/freebsd/proclist.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/sysdeps/freebsd/proclist.c b/sysdeps/freebsd/proclist.c
index 80dd9fd..898f9d4 100644
--- a/sysdeps/freebsd/proclist.c
+++ b/sysdeps/freebsd/proclist.c
@@ -143,6 +143,9 @@ glibtop_get_proclist_p (glibtop *server, glibtop_proclist *buf,
glibtop_get_proc_state_p (server, &procstate, pid);
if (procstate.flags & (1L << GLIBTOP_PROC_STATE_STATE))
if (procstate.state != GLIBTOP_PROCESS_RUNNING) continue;
+
+ if (pinfo[i].ki_ppid == 0 && !strcmp(pinfo[i].ki_comm, "idle"))
+ continue;
}
if (which & GLIBTOP_EXCLUDE_SYSTEM)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]