[gnome-system-monitor] Show running process state for processes with changed cpu time. https://bugzilla.gnome.org/show_bug.
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-system-monitor] Show running process state for processes with changed cpu time. https://bugzilla.gnome.org/show_bug.
- Date: Tue, 11 Dec 2012 01:11:14 +0000 (UTC)
commit da371b277e0ebbc71708f1ce91f879cfc4ab9c9f
Author: Robert Roth <robert roth off gmail com>
Date: Tue Dec 11 03:10:22 2012 +0200
Show running process state for processes with changed cpu time.
https://bugzilla.gnome.org/show_bug.cgi?id=606579
src/proctable.cpp | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/proctable.cpp b/src/proctable.cpp
index 427d9ce..9cc1e36 100644
--- a/src/proctable.cpp
+++ b/src/proctable.cpp
@@ -796,7 +796,12 @@ update_info (ProcmanApp *app, ProcInfo *info)
info->set_user(procstate.uid);
- info->pcpu = (proctime.rtime - info->cpu_time) * 100 / app->cpu_total_time;
+ // if the cpu time has increased reset the status to running
+ // regardless of kernel state (#606579)
+ guint64 difference = proctime.rtime - info->cpu_time;
+ if (difference > 0)
+ info->status = GLIBTOP_PROCESS_RUNNING;
+ info->pcpu = difference * 100 / app->cpu_total_time;
info->pcpu = MIN(info->pcpu, 100);
if (not app->config.solaris_mode)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]